#include<stdio.h>
#include<math.h>
#include<time.h>
#include<stdlib.h>
#define N 5
int main()
{
int number;
int i;
srand(time(0));
for(i=0;i<N;++i){
number = rand()%500+1;
printf("20228329%04d\n",number);
}
return 0;
}
line15的功能是生成一个1-500的随机数并赋值给number
程序的功能是随机生成五个2022级新生的学号
标签:采样,学号,int,number,include,500 From: https://www.cnblogs.com/yuure/p/16805064.html