ldcf.net
当前位置:首页 >> vB编程题,求解 >>

vB编程题,求解

'这题目对初学者,其实很有难度,运行效果如下Private Sub command1_click()Dim X As StringDim brrDim a As LongDim b As LongDim c As LongX = InputBox("请输入3个整数(以英文逗号分隔):", "求最大数", "例如:3,344,51", 1000, 1000)brr = ...

x=inputbox("x=") if x=int(x) then print x;"是整数" else print x;"不是整数"

Private Sub Command1_Click() x = InputBox("键入第一个数") y = InputBox("键入第二个数") z = InputBox("键入第三个数") Max = x If Max < y Then Max = y If Max < z Then Max = z Print "最大值"; Max End Sub

窗体上加一个按钮,完整代码如下: Option Explicit Private Type Record MyName As String * 1 MyAve As Single End Type Private Sub Command1_Click() Dim d(20, 5) As Integer Dim x As Integer Dim i As Integer Dim j As Integer Dim EvrA...

Option Base 1 Dim intArray(5, 5) As Integer Private Sub Command1_Click() Randomize Dim i As Integer, j As Integer Me.Picture1.Cls For i = 0 To 2 Me.Text1(i).Text = "" Next i For i = 1 To 5 For j = 1 To 5 intArray(i, j) = Int(Rn...

‘调用示例 Private Sub Form_Load() MsgBox fun_JC(3) End Sub '阶乘函数 Private Function fun_JC(ByVal N As Integer) As Long Dim i As Integer Dim l As Long l = 1 If N

Private Sub Command1_Click() n = CInt(InputBox("求N!,请输入N的值:")) s = 1 For i = 2 To n s = s * i Next i MsgBox ("N!=" & s) End Sub

设计界面: 修改属性: 窗体Frm1代码: Public n% '定义公共变量Private Sub Command1_Click() Frm2.ShowEnd SubPublic Sub Command2_Click() Print nEnd Sub窗体Frm2代码: Private Sub Command1_Click() If MsgBox("退出程序吗?", vbYesNo, "...

Private Sub Command1_Click() Dim x As String Dim y As String x = Text1.Text y = "" For i = Len(x) To 1 Step -1 y = y + Mid(x, i, 1) Next i Text2.Text = yEnd Sub

4C,5B,6B,7D,8C,9C,10B,11D,12C,13D,14A,15B,16B,17A,18B,19D,20C 21题没有图片

网站首页 | 网站地图
All rights reserved Powered by www.ldcf.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com