Hi , im trying to create a simple code that generate random numbers
Im having two problem ,
1. For some reason randomize() function does not work on VisualC++6
2. I didnt really got the idea on how to set the range of the numbers that will be generated using the rand() function ,. i just saw it in some example .
Here is the code:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i;
randomize();
for (i=0;i<10;i++)
printf ("Number %d: %d\n",i+1,rand()%10+1);
return 0;
}