Hello everyone, I'm trying to build an interactive loan calculator for a school project. These are the requirements:
Your program should do the following:
•Display a Welcome title for the Loan Calculator
•Prompt the user to enter the price of the car
•Prompt the user to enter the length of the term in months
•Prompt the user to enter the APR in percentage (e.g. 4.79%) - without the percent sign of course
Your program should then report with the monthly payment will be.
Use setw() and setfill() to display the content like a receipt. All the data should be neatly displayed.
Example
For a Friend Loan Calculator
Price of Vehicle: $25,000
Term of Loan (in months): 60
APR in percentage (e.g. 4.79% - without the percent sign): 3.8
--------------------------------------------------------------
Total Monthly Payments: $433.50 //NOT ACCURATE
Display all money totals (output values) to two decimal places. You should output an accurate result as well.
For extra credit you may factor in a state auto sales tax of 6.5% of the purchase price of the vehicle and how much of a down payment the user would like to put down. Of course, if you are factor down payment, you must prompt the user to enter that amount.
I attempted to build one but I'm getting a lot of errors using Microsoft visual studio. If anyone could help show me where I need to make changes that would be greatly appreciated! Here it is below:
int main()
{
cout << "Welcome to my Interactive Loan Calculator"<<endl;
cout <<"By My name"<<endl;
cout <<"This program will input basic information about your loan"<<endl;
cout <<"It will output what your monthly payment will be"<<endl;
cout <<endl;
float loanamount;
float interestrate;
float monthlypayment;
cout <<"What is the amount of the loan?$";
cin >>loanamount; cin.ignore();
cout << What is the interest rate on the loan?$";
cin >>interestrate;interestrate/=100;cin.ignore();
cout <<"What is the desired monthly payment?$";
cin >>monthlypayment;cin.ignore();
while(monthlypayment<loanamount*interestrate/12){
cout <<"Not a valid payment amount. Amount must be greater than$";
cout <<(loanamount*interestrate/12)<<endl;
cout <<"What is the desired monthly payment amount?$";
cin >>monthlypayment:cin.ignore();
}