RANDOMnumber

2007-12-05 5:14 am
請問電腦是如何gen出RANDOMnumber的?
更新1:

可否列舉一條程式做example?

回答 (1)

2007-12-06 8:59 pm
✔ 最佳答案
其中一個方法:
用時間做參數(seed), using a function to ouput a value which is in the range.
每 rand 一次都會改一改參數.

If the seed is the same, the random number will be the same.
So, we may need to renew the seed.


收錄日期: 2021-04-23 17:23:34
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20071204000051KK03361

檢視 Wayback Machine 備份