L5 - D

public
yeskendir.sultanov Mar 27, 2024 Never 128
Clone
C++ l5d.cpp 20 lines (15 loc) | 288 Bytes
1
#include <bits/stdc++.h>
2
3
using namespace std;
4
5
int main() {
6
int x, y, p;
7
cin >> x >> p >> y;
8
x *= 100;
9
y *= 100;
10
11
int year = 0;
12
13
while (x < y) {
14
x = x + x * p / 100;
15
year++;
16
}
17
18
cout << year;
19
return 0;
20
}