【C语言】随机数的生产

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# include<stdio.h>
# include<stdlib.h>
# include<time.h>
# define MAX 10

int main(){
int j = 0;
int i = rand();
int list[MAX];
srand((unsigned)time(NULL));
for(j = 0; j &lt; MAX; j++){
i = rand()%100;
list[j] = i;
printf(&quot;%3d %c&quot;,list[j],5);
}
}

如果你不是非常有钱,请不要捐赠,土豪随意