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 s;
- srand( time( NULL ) );
- for(;;)
- {
- s=a+rand()%(b-a+1);
- cout<<s<<endl;
- if(s>=100 && s<=200){
- return 0;
- }
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment