NTR 100 COMPLETE Syllabus and Academic Integrity Acknowledgement Arizona State University
NTR 100 COMPLETE Syllabus and Academic Integrity Acknowledgement Question 1 1 / 1 pts I have read the ASU ā¦
Course Project Week 4
Code:
#include < iostream >
#include < iomanip > #include < cmath > using namespace std;
void main()
{
//user input //declare variables int choice = ' ‘;
float amountBorrowed, interestRate, totalInterest, loanTerm, loanTotal,
total, monthlyRate, mainMenu; cout << endl;
cout << “Welcome to Lucky Duck Car Loan Calculator” << endl; //menu header cout << “****************************************” << endl; cout << " Main Menu " << endl; cout << " Please select an option to begin " << endl; cout << endl; //menu options
cout << “****************************************” << endl; cout << “[1] Open a loan application” << endl; cout << “[2] Exit Program” << endl;
cout << “****************************************” << endl; cin » choice; if (choice == 1)
{
cout << “Please enter the amount you would be borrowing: " << endl;
//insert loop for certain amount range cin » amountBorrowed;
while (amountBorrowed < 50000 || amountBorrowed > 100000)
{ cout << “Loan amounts can only range from $50,000 to
$100,000.” << endl; cout << “Please enter amount within $50,000 and $100,000.” <<
endl; cin » amountBorrowed;
}
cout << “Please enter the preferred interest rate: “; cin » interestRate;
}
if (choice == 2)
{ cout << “Thanks for using the Lucky Duck loan calculator!"; return;
}
//condtional expression asking if cx wants 5 year OR 7 year loan cout << “Which would you prefer? 5 or 7 year car loan: Enter 5 or 7: " <<
endl; cin » loanTerm;
total = (loanTerm*amountBorrowed) +
( loanTerm*amountBorrowed*(interestRate / 100.00));
{if (loanTerm == 5)
//calculate for 5 year loan
{
monthlyRate = total / (loanTerm * 60);
cout << “Your monthly rate for 5 years (60 months) is: " <<
monthlyRate << endl;
}
else
{ if
//calculate for 7 year
( monthlyRate = total / (loanTerm * 84)); cout << “Your monthly rate for 7 years (84 months) is: " <<
monthlyRate << endl;
}
}
//calculations processing
totalInterest = amountBorrowed * interestRate; loanTotal = (amountBorrowed + totalInterest); monthlyRate = loanTotal / loanTerm;
//data output/display
cout << “Your total car loan amount is: " << total << endl; cout << endl;
cout << “Balance towards interst is: " << total - (loanTerm*amountBorrowed)
<< endl; cout << “Would you like to return to the main menu? Y or N” << endl; cin » mainMenu;
if (mainMenu == ‘Y’ || mainMenu == ‘y’) ;
{ main();
}
{ if (mainMenu == ‘N’ || mainMenu == ‘n’) ;
}
system(“pause”) ; }
NTR 100 COMPLETE Syllabus and Academic Integrity Acknowledgement Question 1 1 / 1 pts I have read the ASU ā¦
HEP 456 Module 5 Section 12 and 13 Planning for Analysis and Interpretation and Gantt chartĀ Name HEP 456: ā¦
HEP 456 Module 6 Section 14 Communication and Dissemination of The Findings HEP 456: Health Promotion Program ā¦