亂數 -- rand() 與srand(). 1.標頭檔: #include<stdlib.h> #include<time.h>. 2.rand():產生一個整數的亂數 srand():設定亂數產生的種子. 3.範例. #include<stdio.h>
確定! 回上一頁