作业帮 > 综合 > 作业

请问以下VB程序运行结果是什么呀?1、For I=3 to 17 step 2 print I; next I prin

来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/16 11:21:53
请问以下VB程序运行结果是什么呀?1、For I=3 to 17 step 2 print I; next I print print “n=”; n
请问以下两个VB程序运行结果是什么呀?
1、For I=3 to 17 step 2
print I;
next I
print
print “n=”; n
2、I=1
s=0
Do while I
请问以下VB程序运行结果是什么呀?1、For I=3 to 17 step 2 print I; next I prin
Private Sub Command1_Click()
Dim N As Integer
N = Val(InputBox("请输入一个整数"))
For i = 1 To N
S = ""
For j = 1 To i
S = S + "*"
Next j
Print S
Next i
End Sub
看不懂题目在写什么,随便谢谢 s(n)是不能这样定义数组的
Private Sub Command1_Click()
Dim N As Integer
N = Val(InputBox("请输入一个整数"))
Dim S(N) As Integer
For i = 1 To N
Randomize
S(i) = Int((10 * Rnd) + 1)
Next i
For i = 1 To N
Print S(i)
Next i
End Sub
Private Sub Command1_Click()
Randomize
Dim a(10)
For j = 1 To 10
a(j) = Int(100 * Rnd)
If a(j) Mod 5 = 0 Then k = k + 1
Print a(j)
Next j
Print
Print k / 10
End Sub
Private Sub Command1_Click()
Text1.BackColor = vbRed
Text1.FontSize = 40
Text1.FontName = "黑体"
Text1.FontBold = True
End Sub
如果对您有帮助,请记得采纳为满意答案,谢谢!祝您生活愉快!