Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- int main() {
- int percents_amt, rubles_amt, cents_amt, years, res;
- std::cin >> percents_amt >> rubles_amt >> cents_amt >> years;
- res = rubles_amt * 100 + cents_amt;
- while (years--) {
- res += res * percents_amt / 100;
- }
- std::cout << res / 100 << " " << res % 100;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement