请问以下VB程序运行结果是什么呀? 1、For I=3 to 17 step 2 print I; next I print print “n=”; n
请问以下两个VB程序运行结果是什么呀?1、ForI=3to17step2printI;nextIprintprint“n=”;n2、I=1s=0DowhileI<=10s...
请问以下两个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<=10
s=s+I
I=I+1
Loop
print "s="; s 展开
1、For I=3 to 17 step 2
print I;
next I
print “n=”; n
2、I=1
s=0
Do while I<=10
s=s+I
I=I+1
Loop
print "s="; s 展开
展开全部
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
如果对您有帮助,请记得采纳为满意答案,谢谢!祝您生活愉快!
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 k / 10
End Sub
Private Sub Command1_Click()
Text1.BackColor = vbRed
Text1.FontSize = 40
Text1.FontName = "黑体"
Text1.FontBold = True
End Sub
如果对您有帮助,请记得采纳为满意答案,谢谢!祝您生活愉快!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询