Hakdog

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

#include <iostream>

#include <iomanip>
using namespace std;
int

main ()
{float amount,terms,in,monthlyi,monthlyam,capital,net,totalc,with,OE;
char c,ch;

cout << "1.) Loan\n2.) Statement of Owner's Equity";


cout << "\nEnter Choice:";
cin >> ch;
switch (ch)
{
case '1':
cout << "1.) Loan";
cout << "\nEnter amount:";
cin >> amount;
cout << "Enter terms:\n";
cin >> terms;
in = 0.18;
cout << "\nMonthly Interest=" <<fixed<< setprecision(2) << (amount*in)/12;
cout << "\nMonthly Amortization=" << (amount+terms)/terms;
break;
case '2':
cout << "2.) Statement of Owner's Equity'";
cout << "\nEnter capital:";
cin >> capital;
cout << "\nNet income:36000\n";
net= 36000;
totalc= capital+net;
cout << "\nTotal capital:"<<fixed<< setprecision(2) <<totalc;
cout << "\nIs there a withdrawal [Y|N]:";
cin >> c;
switch (toupper(c))
{
case 'Y':
cout << "\nEnter withdrawal:";
cin >> with;
OE = totalc-with;
cout << "\nOwner's Equity:"<< fixed << setprecision(2) << OE;
break;
case 'N':
cout << "\nOwner's Equity:"<< fixed << setprecision(2) << totalc;
break;
default: cout <<"\nInvalid Choice.";
break;

}default: cout <<"\nInvalid Choice.";


}
return 0;
}

You might also like