标签:
main()
{
unsigned int seed; /*申明初始化器的种子,注意是unsigned int 型的*/
int k;
printf("Enter a positive integer seed value: \n");
scanf("%u",&seed);
srand(seed);
printf("Random Numbers are:\n");
for(k = 1; k <= 10; k++)
{
printf("%i",rand());
printf("\n");
}
return 0;
}
标签:
原文地址:http://www.cnblogs.com/locean/p/5266176.html