Professional Documents
Culture Documents
Edp - Laboratory Activity1 - Onting - Trexie M.
Edp - Laboratory Activity1 - Onting - Trexie M.
LOAN CALCULATOR
Source Code
#include<iostream>
#include<iomanip>
#include<conio.h>
#include<windows.h>
int main()
{
float amort, L_Amount;
float interest, terms, A, bal;
system ("cls");
{
cout << "\n Interest Rate not in the Range";
Sleep(200);
goto loop;
}
loop2:
cout << "\n Terms in months (12/24/36 only) : ";
cin >> terms;
if (terms != 12 && terms != 24 && terms != 36 )
{
cout << "\n Terms you inputted are not Available";
Sleep(200);
goto loop2;
}
interest = interest/100;
A = L_Amount*(1 + (terms*interest));
amort = A / terms;
bal = A - amort;
cout<<"\n Monthly Amortization : "<<amort;
cout<<"\n\n No. of Months Monthly Payment Balance";
return 0;
}
FLOWCHART
Start
cin>>input
cin>>input
if (interest !=1
&& interest!=3 Interest Rate not in the
&& interest!=2) Range
cin>>input
if (terms != 12 &&
terms != 24 && Terms you inputted are
terms != 36 ) not Available x++
bal = bal-amort
Print Total Amount to be Paid
End