Interest
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
problem
A keen saver wants to put £10,000 into a saver account that earns 2% interest each year.
At the end of 5 years there will be £11,040.81
一位热衷储蓄的人希望将1万英镑存入一个存款账户,每年的利息为2%。
5年后,账户上将达到11040.81英镑
Task
Write a program that takes as inputs: m the initial value invested, i the interest rate and, y the number of years the money will be saved for. The program should output the final value of the investment (to the nearest whole pound).
任务:
编写一个程序,将初始资金 m,利率 i ,存款年限 y 作为输入值。程序应该输出投资的最终值。
Input format
Line 1 will provide an integer, m, which will always be from 0 to 100000 inclusive Line 2 will provide a float, i, which will always be from 0.0 to 10.0 inclusive Line 3 will provide an integer, y, which will always be from 0 to 50 inclusive
第1行将提供一个整数m,从0到100000(包括100000)
第2行将提供一个浮点数i,从0.0到10.0(包括0.0)
第3行将提供一个整数y,从0到50(包括0和50)
Output format
An integer
Sample
10000
2.0
5
11041