#include <iostream>
#include<math.h>
using namespace std;
struct LoanGroup {
double Sum_Loan;
int Loan_Length;
double Loan_Rate;
double Month_Supply;
double Month_Rate;
};
int main()
{
LoanGroup LOAN_P;
cout << endl << endl;
cout << endl << endl;
cout << " ---------------等额本息法房贷计算器----------------- " << endl << endl;
cout << " V1.0 20220617 " << endl;
cout << endl << endl;
cout << " Business Loan(万) : ";
cin >> LOAN_P.Sum_Loan;
LOAN_P.Sum_Loan *= 10000;
cout << " Loan Sum Month Length : ";
cin >> LOAN_P.Loan_Length;
cout << " Loan Rate : ";
cin >> LOAN_P.Loan_Rate;
LOAN_P.Month_Rate = LOAN_P.Loan_Rate / 12;
LOAN_P.Month_Supply = (LOAN_P.Month_Rate)*pow((1 + LOAN_P.Month_Rate), LOAN_P.Loan_Length) * LOAN_P.Sum_Loan / (pow((1 + LOAN_P.Month_Rate), LOAN_P.Loan_Length) - 1);
cout << endl << endl;
cout << " OutCome :" << endl;
cout << " Your Business Loan(万) : " << LOAN_P.Sum_Loan / 10000 << endl;
cout << " Loan Sum Month Length : " << LOAN_P.Loan_Length << endl;
cout << " Loan Rate : " << LOAN_P.Loan_Rate << endl;
cout << " Month Supply : " << LOAN_P.Month_Supply << endl;
cout << " Sum Profit(万) : " << (LOAN_P.Month_Supply * LOAN_P.Loan_Length - LOAN_P.Sum_Loan) / 10000 << endl;
system("Pause");
}
链接:https://pan.baidu.com/s/1kHgKiDj7aymeroTucWuhwQ?pwd=s7gt
提取码:s7gt
复制这段内容后打开百度网盘手机App,操作更方便哦