tim:
heres my algorithm for randomizing numbers
that will give you a number between 1 and 10Code:#include <iostream.h> #include <time.h> #include <stdlib.h> const int HIGH = 10; const int LOW = 1; int main() { time_t seconds; //seconds is variable for time time(&seconds); srand((unsigned int) seconds); int num; num= rand() % (HIGH - LOW + 1) + LOW; cout<<num<<endl; return 0; }