[問題] 請問隨機變數的產生??

看板C_and_CPP (C/C++)作者 (千里之外)時間14年前 (2012/06/12 00:59), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) dev-c 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) 問題(Question): 有關隨機變數的產生方法?? srand(time(NULL)); int n= rannd()%10; 但似乎在某一段的時間(1秒多吧,不確定??)內, 所產生的值是相同的,可否在極短的時間產生多個亂數呢?? 如1秒內產生100個變數?? 餵入的資料(Input): 預期的正確結果(Expected Output): 錯誤結果(Wrong Output): 程式碼(Code):(請善用置底文網頁, 記得排版) 補充說明(Supplement): -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.26.133.114

06/12 01:04, , 1F
文章代碼(AID): #1FrYG70L (C_and_CPP)
文章代碼(AID): #1FrYG70L (C_and_CPP)