《完美C++》1.4客户贷款问题

#include<iostream>
using namespace std;
int main()
{
    double real_loans,rate,time;
    cin>>real_loans>>rate>>time;
    double apply_loans=real_loans/(1-rate/100*time/12),month_repay=apply_loans/time;
    cout<<"apply_loans should be "<<apply_loans
    <<endl<<"month_repay should be "<<month_repay<<endl;
    system("pause");
} 

posted @ 2010-10-21 18:16  hailong  阅读(141)  评论(0编辑  收藏  举报