討論串[wizs] 問題-選取
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者laechan (小太保)時間14年前 (2011/06/20 17:47), 11年前編輯資訊
0
0
0
內容預覽:
int random_sort(int a1,int a2). {. return -1+random(3);. }. 自訂上述函數即可,再讓你的 a 陣列去呼叫它.. a=sort_array(a,"random_sort",this_object());. (random_sort 就自己寫在
(還有2294個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者hlead (希多)時間14年前 (2011/06/20 12:44), 編輯資訊
0
0
0
內容預覽:
for(i = 0; i < 10; i++). {. int j = random(10);. int tmp = a[i];. a[i] = a[j];. a[j] = tmp;. }. 最原始的方法...avert. int i = random(8);. a[i]. a[i+1]. a[i+
(還有261個字)

推噓2(2推 0噓 4→)留言6則,0人參與, 最新作者justinj (黑旋風)時間14年前 (2011/06/20 09:56), 編輯資訊
0
0
0
內容預覽:
在前幾天想要寫數獨製造程式時的某些問題. 假如 a=({1,2,3,4,5,6,7,8,9})時. Q1.想要讓a亂序的話是 a=sort_array(a,"random_sort",this_object());. //random_sort的設定就是return -1+random(2). Q2
(還有658個字)
首頁
上一頁
1
下一頁
尾頁