In this rather basic C++ code snippet involving random number generation:
include using namespace std; int main() { cout << (rand() %
You need to change the seed.
int main() { srand(time(NULL)); cout << (rand() % 101); return 0; }
the srand seeding thing is true also for a c language code.
srand
c
See also: http://xkcd.com/221/