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,b,c,d;
- int main()
- {
- b=-1000;
- c=1000; //zakres
- do
- {d=b+rand()%(c-b);//losowość
- cout<<b+rand()%(c-b)<<endl;
- }while(d<100 || d>200); //gdy w zakresie zakoncz
- {cout<<d;}
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement