# #Include . #Include. #Include. Using Namespace Std . Int

746 WordsMar 9, 20173 Pages
#include #include #include using namespace std; int main() { int choice; int flag=0; // this flag allow skip other question in case a bad choice double Amount_loan, creditscore, monyhlypayment, NumPayments, NumPayment, intrest, AmountPaid; //adding this variables double monthlyRate, balance, principal, interest, totalInterest; const double loanupA500 = 4.25, loanupA600 = 3.25, loanupA700 = 2.75; const double loanupM500 = 6, loanupM600 = 5, loanupM700 = 4; const double Auto_loan = 1; const double Mortgage_loan = 2; cout << "Loan 's table" << endl; cout << "______________________________________________________________________________________________" << endl; cout << "Loan Type under 500 Up 500…show more content…
reditscore < 500) { cout << "Not Approved "<< loanupA500 << endl; // to get the monnthyly percentage we divide by 12 months monthlyRate = loanupA500/12; //to get the rate we divide by 100% monthlyRate = monthlyRate/100; //intrest = pow(1 + loanupA500 / 100, 1.0 / 12); } else if (creditscore >= 600&& creditscore << loanupA600 << endl; // to get the monnthyly percentage we divide by 12 months monthlyRate = loanupA600/12; //to get the rate we divide by 100% monthlyRate = monthlyRate/100; //intrest = pow(1 + loanupA600 / 100, 1.0 / 12); //cout << "interest rate for a month is: " << monthlyRate << endl; } else { cout << loanupA700 << " % yearly" << endl; // to get the monnthyly percentage we divide by 12 months monthlyRate = loanupA700/12; //to get the rate we divide by 100% monthlyRate = monthlyRate/100; //intrest = pow(1 + loanupA700 / 100, 1.0 / 12); cout << "interest rate for a month is: " << monthlyRate << endl; } monyhlypayment = (Amount_loan * monthlyRate)/(1-pow(1+monthlyRate,-NumPayments)); AmountPaid = monyhlypayment * NumPayments; cout << "Amount paid is " << AmountPaid << endl; cout << "Monthly Payment: " << monyhlypayment << endl; // loop