| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 633 人关注过本帖
标题:wodeliuyan
只看楼主 加入收藏
23760639
Rank: 1
等 级:新手上路
帖 子:277
专家分:0
注 册:2005-5-13
收藏
 问题点数:0 回复次数:0 
wodeliuyan

demon(7310026) 19:26:27 Dim a(1 To 10) As Integer Dim publicShu As Integer

Private Sub Command1_Click() Dim q As Integer

Dim ifExists As String

q = 0

Do DoEvents If publicShu > 10 Then Exit Do ifExists = "" q = 0 q = Int(Rnd() * 10 + 1) ifExists = "" For i = 1 To 10 If a(i) = q Then ifExists = "yes" Exit For End If Next i If ifExists = "" Then Exit Do End If Loop

If q > 0 Then

For i = 1 To 10 If a(i) = 0 Then a(i) = q publicShu = publicShu + 1 Exit For End If Next i

List1.AddItem q End If

End Sub

Private Sub Form_Load() For i = 1 To 10 a(i) = 0 Next i List1.Clear publicShu = 0

搜索更多相关主题的帖子: wodeliuyan 
2005-07-12 20:25
快速回复:wodeliuyan
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.022668 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved