C/C++隨機數生成 rand() srand()

轉載自 http://www.cnblogs.com/caosiyang/archive/2012/07/03/2575236.html html 隨機數包括僞隨機數和物理隨機數,我要說的是使用rand()和srand()生成僞隨機數,儘管是僞隨機,也能知足大部分要求。算法   #include <stdlib.h> int rand(void); 返回一個僞隨機數,範圍是0-RAND_MAX(
相關文章
相關標籤/搜索