-->
当前位置:首页 > 题库

PROGRAMMING:Calculate the principal and interest of bank deposit

Luz5年前 (2021-05-10)题库465
This topic requires the calculation of the principal and interest of bank deposits. The calculation formula is $$sum = money times (1 + rate) ^ {year} $$, where $$sum $$is the total principal and interest at the time of deposit maturity (before tax), $$money $$is the deposit amount, $$year $$is the deposit period, and $$rate $$is the annual interest rate.
###Input format:
Enter two positive integers $$money $$, $$year $$, and a positive real number $$rate $$, separated by spaces, in one line.
###Output format:
In one line, output in the format of "sum = principal and interest", where the principal and interest retain two decimal places. Please note that there is a space on the left and right of the equal sign.
###Input example:
```in
1000 3 0.025
```
###Output example:
```out
sum = 1076.89
```







answer:If there is no answer, please comment