I'm very new at this and would like a help w/ code below.
The problem asks for how many random number the user wants but when I run it... it always gives 10 eventhough I just ask for 3!
Pls help. Thanks!
int status = 0, n, i;
unsigned initial_seed;
Random my_rand;
cout << "This program will generate random numbers that you can retrieve back" << endl;
cout << "How many random numbers do you want generated?" << endl;
cin >> n;
for (i=n; i<n; i++)
cout << n <<": " << my_rand.get_rand() << endl;
cout << "Initial seed is " << my_rand.get_seed() << endl;
//cout << "seed is " << my_rand.get_seed() << endl;
//reset sequence
my_rand.set_seed(initial_seed);
//for(i=0; i<10; i++)
// cout << i <<": " << my_rand.get_rand() << endl;
Also, how do I make it so I can add a "sequence # to that set of rand. #'s so when the user asks for that particular set, it will show it back?