討論串[問題] 撰寫一程式以產生亂數的問題
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者kmeita (mim)時間14年前 (2011/07/29 21:52), 編輯資訊
0
0
0
內容預覽:
#include <stdio.h>. #include <stdlib.h>. #define randomize() srand((unsigned time(NULL)). int main(). {. int i,x,n;. int ctr[6]={0, 0, 0, 0, 0, 0,};.
(還有655個字)

推噓1(1推 0噓 7→)留言8則,0人參與, 最新作者totoron10 (totoron)時間14年前 (2011/07/29 14:38), 編輯資訊
0
0
0
內容預覽:
習題:撰寫一程式產生500個介於1-6之間的亂數,即1<= x <= 6,並統計各數字出現的次數.. 以下是程式碼:. #include <stdio.h>. #include <stdlib.h>. #define randomize() srand((unsigned time(NULL)).
(還有368個字)
首頁
上一頁
1
下一頁
尾頁