ppts.net
当前位置:首页>>关于vb编程!在线等答案!!!!!!!!!的资料>>

vb编程!在线等答案!!!!!!!!!

第一题: Private Sub form_Click() Dim A(5, 4) As Integer, I As Integer, J As Integer Dim T As Integer, Max As Integer Randomize Timer Print "原矩阵:" For I = 1 To 5 For J = 1 To 4 A(I, J) = Int(Rnd * 20 + 10) Print A(I, J); Ne...

96:A:等号左边只能写一个变量,不能写表达式 B:原因同上,或者属于比较运算,不能直接作为语句执行 100: X+ Y*Z的结果是17.4,分号的作用是连接,那么结果自然是A( 17.4 ) 159:给你讲一下循环的处理步骤: 首先,给t赋值1,因为1在1和3之间...

完整代码如下,可以解释。 Private f As Integer, m As Integer Private Sub Command1_Click() Dim n As Integer Do n = Val(InputBox("请输入秒数:(小于3600)")) Loop Until (n < 3600) f = n \ 60: m = n Mod 60 Label1.Caption = f & ":" & ...

Dim n As IntegerPrivate Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then n = 0 Dim s As String s = Text1.Text For i = 1 To Len(s) If Val(Mid(s, i, 1)) Mod 2 0 Then n = n + 1 End If Next i Text2.Text = n End IfEnd Sub

Private Sub Command1_Click() a = CInt(Text1.Text) b = CInt(Text2.Text) If b > a And b / a < 1.2 Then Label3.Caption = "警告,您的车速超过限速!" Else If b / a >= 1.2 And b / a < 1.5 Then Label3.Caption = "您的车速超过限速20%,...

1.c 2.b 3.a 4.d 5.c 6.a 7.b 8.c 9.a 10.c(这题不是很确定) 11.a 12.d 13.c 14.b 15.c 16.d 17.b(这题不是很确定) 18.a 19.c 20.b 这些是自己做的……有的还没学所以已经标定不确定了。 虽然不能保证100%正确,但……也是我一题题做的,大多数都是...

都不难啊,好好学习啊 包含第一第二 Private Sub Form_Load() m = fun(100, 122) MsgBox m '返回3个 m = fun2(1, 4) MsgBox m '返回7 End Sub Function fun(a As Long, b As Long) As Long Dim g As Integer, s As Integer, js As Long js = 0 F...

Private Sub Command1_Click() Dim i%, k% For i = 1 To 1000 If Int(Sqr(i)) = Sqr(i) Then Print i,: k = k + 1 If k Mod 5 = 4 Then Print: k = 0 Next End Sub Private Sub Command2_Click() Dim OS%, JS%, m$ m = InputBox("请输入一个整数...

list和text都不需要设置就可以直接添加或填上数字的啊

是这样的吗,建一个模块,在里面加入以下代码: Function grade(js As Integer, bs As Integer)If js >= 85 And bs >= 85 Then grade = "优秀" ElseIf js < 60 And bs < 60 Then grade = "不合格" Else grade = "合格"End IfEnd Function

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