velimir

zelka

Jan 15th, 2012
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int i, x, y, z, y2;
  8.     cin >> x >> y >> z;
  9.     y2 = y;
  10.     if(x==y)
  11.     {
  12.         cout << "1";
  13.         goto loop;
  14.     }
  15.     else for(i=1; x>y2; i++) y2=y2+y-z;
  16.     cout << i;
  17.     loop:
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment