Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Lec12.cpp
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main()
- {
- srand((unsigned int)time(0)); // don't call srand in a loop...just once at the beginning
- for (int i = 0; i < 15; i++) {
- int randNum = 1 + rand() % 100;
- cout << randNum << endl;
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement