C语言怎样设rand()的随机数种子啊?

2026年09月23日 23:19
有1个网友回答
网友(1):

请使用C库函数srand()来设定随机数种子,其原型为:
void srand(
unsigned int seed
);
其中seed就是设定的随机数种子。