generate a random number in c between 1 and 100 c++ code example Example: c++ random number between 1 and 10 cout << (rand() % 10) + 1<<" ";