问题库

用c++解决: 1000元债务全部分期,每月50(先扣掉利息再用以抵消债务),利息是剩余债务*0.0

阳心明眸
2021/5/3 6:15:09
最后的利息怎么看着不对?
(我没有财富了,请资源回答)
The total number of the month is 25
The total exmoney is 4.85432e+008
请按任意键继续. . .
int month=0;
double money=1000.00,exmoney=0.00;
const double rate=0.015;
while(money>=0)
{
exmoney+=(exmoney+money*rate);
money-=(50.00-money*rate);
month++;
}
month++;
exmoney+=exmoney+money*rate;
cout<<"The total number of the month is "<<month<<endl;
cout<<"The total exmoney is "<<exmoney<<endl;
return 0;
该问题暂无答案!

我来回答

匿名 提交回答
相关问题