#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; // Define a function for the standard loan payment formula uc.DefineFunction("LoanPmt(rate, nper, pv) = Int((rate * pv) / (1 - (1 + rate)^-nper)*100)/100"); // Define variables for the calculation uc.DefineVariable("monthly_rate = 0.05 / 12"); // 5% annual rate uc.DefineVariable("periods = 30 * 12"); // 30 years uc.DefineVariable("loan_amount = 200000"); // $200,000 cout << uc.EvalStr("LoanPmt(monthly_rate, periods, loan_amount)") << endl; }