假设银行一年整存零取的月息为0.63%,现在某人手中有一笔钱,他打算在今后的5年种的每年年底取出1000元,到第五年时刚好取完,请计算出他存钱时应该存入多少。
#include <bits/stdc++.h>
using namespace std;
int main()
{
int i;
double money=0.0;
for(i=0;i<5;i++)
money=(money+1000.0)/(1+0.0063*12);
printf("应存入的钱数为:%0.2f\n",money);
}