In this rather basic C++ code snippet involving random number generation:
include using namespace std; int main() { cout << (rand() %
For what its worth you are also only generating numbers between 0 and 99 (inclusive). If you wanted to generate values between 0 and 100 you would need.
rand() % 101
in addition to calling srand() as mentioned by others.