📄 debt.h
字号:
#ifndef _H_DEBT
#define _H_DEBT
#include <iostream>
#include <cmath>
using namespace std;
class Debt
{
private:
double R; // Bank debt rate
double R5; // rate under 5 years
double R30; // rate beyond 5 years
public:
double T; // Total debt
double P; // pay for month
double N; // mount of periodics
double Table[30]; // pay table, the basis is 10,000 Yuan
double Increment; // the Increment of the debt
double Remain;
public:
void GetR(double _R5, double _R30); // Get R
double GetT(double _t); // Get T
double GetP(double _p); // Get P
double GetN(double _n); // Get N
double CalP(); // When get N, calculate P
double CalN(); // when get P, calculate N
void CalPayTable(); // calculate P with N changing from 1 year to 30 years
double CalIncrement(); // calculate incremental debt for rate R and periodics N
void ShowInfo();
double RemainAft(int nMonth);
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -