当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

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

共提交 899

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