Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <ctime>
- using namespace std;
- int a=-1000,b=1000;
- int e;
- int main()
- {
- srand(time(NULL));
- while(true)
- {
- e=a+rand()%(b-a+1);
- cout << e << endl;
- if((e>=100) && (e<=200))
- {
- return 0;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement