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()
- {
- int i;
- int x;
- int a=-1000;
- int b=1000;
- srand(time(NULL));
- do
- {
- x = a + rand() % (b - a + 1);
- cout << x << endl;
- } while (x <=100 || x >= 200);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement