//用时间做种子,每次产生随机数不一样 srand((unsigned) time(NULL)); //rand()取值范围:0~32767 printf("%d\n",rand()); return 0;
C语言随机数的生成
原文:https://www.cnblogs.com/ryanLee1/p/9775786.html