📜  如何在 C 编程语言代码示例中生成随机数

📅  最后修改于: 2022-03-11 15:04:37.195000             🧑  作者: Mango

代码示例1
#include 
#include 

srand(time(NULL));   // Initialization, should only be called once.
int r = rand();      // Returns a pseudo-random integer between 0 and RAND_MAX.