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=10;
- int b=20;
- int c=0;
- srand(time(NULL));
- for(int i=1;i<101;i++)
- {
- c=c+(a+rand()%(b-a+1));
- }
- cout << c;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement