SHARE
TWEET

Untitled

mfgnik Jun 2nd, 2020 702 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. int main() {
  5.     int percents_amt, rubles_amt, cents_amt, years, res;
  6.     std::cin >> percents_amt >> rubles_amt >> cents_amt >> years;
  7.     res = rubles_amt * 100 + cents_amt;
  8.     while (years--) {
  9.         res += res * percents_amt / 100;
  10.     }
  11.     std::cout << res / 100 << " " << res % 100;
  12.     return 0;
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top