討論串[問題] 撰寫一程式以產生亂數的問題
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁
內容預覽:
#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個字)
內容預覽:
習題:撰寫一程式產生500個介於1-6之間的亂數,即1<= x <= 6,並統計各數字出現的次數.. 以下是程式碼:. #include <stdio.h>. #include <stdlib.h>. #define randomize() srand((unsigned time(NULL)).
(還有368個字)
首頁
上一頁
1
下一頁
尾頁