#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void main() {
int n, i;
srand(time(NULL));
for (i = 0; i < 100; i++) {
n = rand() % 100 + 1;
printf("%d,", n);
}
}
随机数:生成100个1(含1)-100(含100)之间的随机数。
猜你喜欢
转载自blog.csdn.net/qq_38490457/article/details/104576811
今日推荐
周排行