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