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 a=-1000;
- int b=1000;
- int c=100;
- int d=200;
- int e;
- srand(time(NULL));
- while (true)
- {
- e=a+rand()%(b-a+1);
- cout <<e;
- cout << endl;
- if ((e>c)&&(e<d))
- {
- system("pause");
- }
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment