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