Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "iostream"
- #include "cstdlib"
- #include "ctime"
- using namespace std;
- int main()
- {
- srand(time(0));
- long long rnd, min, max;
- char action;
- min = 1;
- max = 10000000000;
- do
- {
- rnd = rand() % (max - min + 1) + min;
- cout << rnd << "\n";
- cin >> action;
- if(action == '=')
- {
- break;
- }
- if(action == '>' && rnd > min)
- {
- min = rnd;
- }
- if(action == '<' && rnd < max)
- {
- max = rnd;
- }
- }
- while(true);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement