rand()函数
#include "stdio.h"
#include "stdlib.h"
#include "time.h"
int main(){
int i,num;
srand(time(0));
for(i=0;i<10;i++){
num=rand()%10+1;
printf("%d\n",num);
}
printf("\n");
system("pause");
return 0;
}
标签:输出,int,C语言,随机数,time,include
From: https://www.cnblogs.com/huxiaoan1/p/16869767.html