velimir

plata

Jan 22nd, 2012
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     long int n, m, s, sum = 0, i;
  8.     cin >> n >> m >> s;
  9.     for(i = 0; sum<s; i++)
  10.     {
  11.         if(i<100)sum+=n;
  12.         if(i>=100) sum+=m;
  13.     }
  14.     cout << i;
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment