1#include <stdio.h>
2#include <stdlib.h>
3#include <time.h>
4
5main(){
6 int vet[1000], fre[50];
7 int i;
8
9 srand(time(NULL));
10
11 for(i=0;i<1000;i++){
12 vet[i]=(rand()%51);
13 }
14
15 for(i=0;i<1000;i++){
16 printf("%d\n", vet[i]);
17 }
18
19 for(i=0;i<1000;i++){
20 fre[vet[i]]=fre[vet[i]]+1;
21 }
22
23 for(i=0;i<51;i++){
24 printf("The number %d was generated %d times\n", i, fre[i]);
25 }
26}
27