Question: Car Loan Write a program to analyze a car loan. See Fig.3.79 . The user should enter the amount of the loan, the annual percentage

Car LoanWrite a program to analyze a car loan. SeeFig.3.79. The user should enter the amount of the loan, the annual percentage rate of interest, and the duration of the loan in months. After each piece of data is entered, the data should be checked to make sure it is reasonable. If bad data has been supplied, the user should be so advised. Otherwise, the monthly payment and the total amount of interest paid should be displayed. The formula for the monthly payment is

monthlypayment= pr / 1(1+r)-n,

wherepis the amount of the loan,ris the monthly interest rate (annual rate divided by12) given as a number between 0 (for 0%) and 100 (for 100%), andnis the duration of the loan in months. The formula for the total interest paid is

totalinterest = n[monthlypayment]p

.

Enter the amount of the loan: 18000 Enter the interest rate: 5.25 Enter the duration in months: 60 Monthly payment: $341.75 Total interest paid: $2,505.00 

FIGURE

3.79Possible outcome of

Programming Project

1.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!