I was playing with some code again
#include <iostream>
#include <cstdlib>
using namespace std;
int main ()
{
int seed;
cout << "Enter a seed: "; //enter 8
cin >> seed;
srand (seed);
cout <<"A is " << rand () << endl; //64
cout <<"B is "<<rand () << endl; //28170
cout <<"C is "<< rand () << endl; //311
cout <<"D is "<< rand () * rand () << endl; //803546005
return 0;
}
and I was wondering, why does A always print out 64, i didn't see any function that does that in this code snippet, if possible a explanation of how B, C and D derive those values will help alot too.
Sorry to trouble you guys again. :)