1020:2.15财务应用程序:复利值

题目描述

(财务应用程序:复利值)假设你每月向银行账户存100美元,年利率5%,那么每月利率是0.05/12。第一个月之后,账户上的值就变成:

                100*(1+0.00417=100.417

第二月之后,账户上的值就变成:

                (100+100.417)*1+0.00417=201.252

第三个月之后,账户上的值就变成:

               (100+201.252*1+0.00417=302.507

以此类推。

编写程序显示n个月后账户上的钱数。

输入解释

请输入一个整数n。

输出解释

输出结果保留三位小数

输入样例
6
输出样例
The 1 months later,deposit in the account is 100.417
The 2 months later,deposit in the account is 201.252
The 3 months later,deposit in the account is 302.507
The 4 months later,deposit in the account is 404.184
The 5 months later,deposit in the account is 506.285
The 6 months later,deposit in the account is 608.811
提示

已知年利率,转换月利率

计算用原数据

输出结果保留三位小数


该题目包含在题集 SSPU

题目来源 sspu

共提交 903

通过率 38.76%
时间上限 内存上限
1000 MS 128 MB

·

·

·

·

登陆或注册以提交代码