#include "stdafx.h"
#include <stdlib.h>
#include <time.h>
int main() {
int a;
srand((unsigned)time(NULL)); //设置随机种子后 随机数会形成固定的序列
a = rand();
printf("%d\n", a);
getchar();
return 0;
}
原文:https://www.cnblogs.com/ganxiang/p/13619222.html