Question: Write a C Program that will calculate the monthly payment on a new car. You will prompt the user to enter the following data: P

 Write a C Program that will calculate the monthly payment on

Write a C Program that will calculate the monthly payment on a new car. You will prompt the user to enter the following data: P = principal(the amount of money you borrow) a annual interest rate. Have the user enter 1.9% as 1.9. Divide this by 100 for the formula. (note: you will prompt for annual rate, a, but will use the monthly rate, i, in the formula below Calculate i by dividing a by 12.. is a/12) . . n number of monthly payments on the loan Use the following formula to calculate the monthly payment: payment You should ask the user to input each of the three data points. . All variables should be declared as variable type double. The calculation of the payment should be done in a function called calcPayment. This function should accept p, a, and n as parameters and return the calculated monthly payment as a double. You should output the monthly payment, including a $ and rounding your answer to 2 decimal places. Give appropriate comments throughout the program. Test your program with the following data: p $30,000 a = 1.9% n 60 months Submit a screenshot of your output pasted into a word document and your.c file to the Canvas

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 Databases Questions!