C 語言中若要產生亂數,可以使用 stdlib.h 中的 rand 函數,而在呼叫 rand 函數之前,要先使用 srand 函數設定初始的亂數種子: #include <stdio.h> ...
確定! 回上一頁