概述
Dim sum As Integer Dim sum As Integer
Dim i As Integer Dim i As Integer
Dim a As Integer Dim a As Integer
Private Sub Command1-Click() Private Sub Command1-Click
sum =0 sum =0
For i=1To 10 For i=1 To 10
Randomize Randomize
a=Int(1000*Rnd) a=Int (1000*Rnd)
sum=sum+a sum=sum+a
Next Next
MsgBox"10个随机数和为:"&sum MsgBox "10个随机数和为:"&sum
i=1 i=1
Do While i<=10 Do While i<=10
Randomize Randomize
a=Int(Rnd*1000) a=Int(Rnd*1000)
sum=sum+a sum=sum+a
Loop i=i+1
MsgBox "10个随机数和为:"&sum Loop
End Sub MsgBox"10个随机数和为:"&sum
End Sub
最后
以上就是犹豫白开水为你收集整理的随机取10个数6的全部内容,希望文章能够帮你解决随机取10个数6所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复