Advertisement
Qpel

41 6 uzd

Sep 30th, 2014
497
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int a,b,c,ab=0,ats=0,i;
  8.     cin >> a >> b >> c;
  9.     for (i=0; i<c; i++){
  10.             if(ab<c){
  11.                 ab=ab+a+b;
  12.                 ats++;
  13.                     }
  14.     }
  15.  
  16.     cout << ats*2;
  17.  
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement