1、#include“more_cash_flow.h“ #include using namespace std; void main() more_cash_flow mcf=more_cash_flow(); /mcf.more_cash_flow(); cout using std:vector ; #include #include more_cash_flow:more_cash_flow() cflow_times.push_back(0); cflow_times.push_back(1); cflow_times.push_back(2); cflow_times.push_ba
2、ck(3); cflow_times.push_back(4); cflow_amounts.push_back(0.0); cflow_amounts.push_back(100.0); cflow_amounts.push_back(200.0); cflow_amounts.push_back(300.0); cflow_amounts.push_back(400.0); r=0.1; double more_cash_flow:more_cash_flow_fv_discrete() double FV=0.0; for(int t=0;t using std:vector; #include class more_cash_flow public: more_cash_flow(); double more_cash_flow_pv_discrete(); double more_cash_flow_fv_discrete(); private: vector cflow_times; vector cflow_amounts; double r; ;