#include <stdio.h>#include <stdlib.h>#include <time.h>int main (){ int iSecret, iGuess; /* 初始化隨機種子 */ srand ( time(NULL) );/* generate secret number: */ iSecret = rand() % 10 + 1;
}
上邊的隨機數種子只能用時間初始化嗎?有沒有其他的初始化方法 或者說 不用初始化
頂