#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int list[]; /*creating an arry call list*/
int main()
{
srand(time(NULL));
void element()/*creating the first element function*/
{
int i;
for (i=0; i<100; i++){
list[i] = 100+rand()%900 ;
}
for (i=0; i<100; i++){
printf("%d", list[i]);
}
}
return 0;
}
I don't know why does it give me nothing as result, the purpose of the code is to generate 100 random numbers and puts the number into the array.