Advertisement
Michal_Pilarski

zad5 pseudolosowosc

Apr 1st, 2020
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4. #include <windows.h>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10.     int a;
  11.     srand(time(NULL));
  12.     for(;;)
  13.     {
  14.     a = rand()%2001-1000;
  15.     cout << a <<" ";
  16.     Sleep(1000);
  17.     if(a<201 && a>99)
  18.         return 0;
  19.     }
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement