编写代码:
Private Sub Command1-Click()
Dim max as IntegerDim f(9) as integer
Dim mystr as String
mystr=" "
For i=0 to 9
f(i)=Int(Rnd()*1000+5)
mystr=mystr+" "+str(f(i))
'print Str(f(i))
Next i
Print mystr
max=f(0)
For i=1 to 9
If f(i)>max then
max=f(i)
End if
Next i
Print Str(max)
End Sub
本文介绍了一个使用VBScript编写的简单程序,该程序能够生成10个介于5到1005之间的随机整数,并找到并打印这些数中的最大值。
1745

被折叠的 条评论
为什么被折叠?



