So I'm making a program that takes a price a trade-in value and a down payment with an interest rate to find a loan amount and then break that loan amount into 5 different length loans. The only thing I can't figure out how to do is get it to display the 12 month loan because if I set int noMonth = 0 I don't get a table at all and if I set it to 12 I don't get the 12 month to display
Your while statements do nothing, did you mean dowhile ? Put the keyword do before line 16, same for the other functions. Place the while part on the same line as the closing brace, makes it obvious that it is a do loop.
Tell us about the logic of line 113.
Prefer to use double rather than float, the precision of float is easily exceeded
Line 118 could make use of the calcMonPayament function.
@OP
You have many problems with your code. This gets you on the right track. How accurate and meaningful it is, is up to you. You'll need to carefully examine what changes I have made - again up to you :)
Please enter vehicle price: 10000
Please enter trade in value: 900
Please enter the amount of the down payment: 90
Please enter the interest rate.: .04
Honest Dave's Used Cars
Vehicle price: $10000.00
Trade-In Value: $900.00
Down Payment: $90.00
-----------------
Loan Amount: $9010.00
Annual Interest Rate: 4.00%
Monthly Payment Options:
12 Months $767.20
24 Months $391.26
36 Months $266.01
48 Months $203.44
60 Months $165.93
End
Program ended with exit code: 0