1.由已知得第五年可取1000元;
2.依次逆推前四年;
3.输出结果;
#include<iostream>
#include<math.h>
using namespace std;
double money(double a){
double num=0;
num=(1000+a)/(1+0.0063*12);
return num;
}
int main(){
double abb=0;
for(int i=0;i<5;i++){
abb=money(abb);
printf("%.2f\n",abb);
}
return 0;
}
标签:abb,return,int,double,最佳,num,存款,money,day From: https://www.cnblogs.com/drz1145141919810/p/17324048.html