我是靠谱客的博主 犹豫白开水,最近开发中收集的这篇文章主要介绍随机取10个数6,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

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所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(78)

评论列表共有 0 条评论

立即
投稿
返回
顶部