討論串[.NET] 欲使產生之亂數不重複的問題!
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者rike (靠杯~~冷笑話滾蛋)時間19年前 (2006/04/13 07:29), 編輯資訊
0
0
0
內容預覽:
Dim a, i, j As Integer. Dim take(3) As Integer. Randomize(). Label1.Text = "". For i = 0 To 3. For j = 0 To i. Do While a = take(j). a = Int(Rnd() * 1
(還有83個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者clifflu ( What for ?)時間19年前 (2006/04/11 08:08), 編輯資訊
0
0
0
內容預覽:
如果把流程改掉呢 ?. 一次取得一個數,重取直到與前面都不相同 ?. dim a, j as integer. dim take() as integer. dim isok as boolean ' true if ok. randomize. take(a) = int(rnd() * 10)
(還有174個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者zero1590 (小白)時間19年前 (2006/04/11 07:53), 編輯資訊
0
0
0
內容預覽:
各位前輩好,我想產生4個亂數,. 每個亂數不能一樣,. 我想了一個晚上,. 做出來以下的程式.... dim a,i,j as integer. dim take() as integer. Randomize(). For a = 0 To 3. take(a) = Int(Rnd() * 10)
(還有312個字)
首頁
上一頁
1
下一頁
尾頁