Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int i, x, y, z, y2;
- cin >> x >> y >> z;
- y2 = y;
- if(x==y)
- {
- cout << "1";
- goto loop;
- }
- else for(i=1; x>y2; i++) y2=y2+y-z;
- cout << i;
- loop:
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment