DawidKubiak

Zadanie 5

Apr 19th, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int a=-1000;
  9.     int b=1000;
  10.     int c=100;
  11.     int d=200;
  12.     int e;
  13.     srand(time(NULL));
  14.     while (true)
  15.     {
  16.          e=a+rand()%(b-a+1);
  17.          cout <<e;
  18.          cout << endl;
  19.          if ((e>c)&&(e<d))
  20.              {
  21.                  system("pause");
  22.              }
  23.     }
  24.     return 0;
  25. }
Add Comment
Please, Sign In to add comment