You have saved $500 to use as a down payment on acar. Before beginning your car shopping, you decided to write a program to help you figure out what your monthly payment will be, given the car’s purchase price, monthly interest rate, and the time period over which you will pay back the loan. The formula for calculating your payment is payment=iP/(1-(1+i)^(-n) ) Where P=principal (amount you borrow) I=monthly interest rate (1/12 of the annual rate) n=total number of payments Your program should prompt the user for the purchase price, the down payment, the annual interest rate and total n
Output('Enter purchase price') Input(P) Output('Enter down payment') Input(d) Output('Enter annual interest rate') Input(i) Output('Enter number of payments') Input(n) P = P - d payment=iP/(1-(1+i)^(-n) ) Output('You monthly payment will be ', payment)
oh thank you so much and sorry for the late reply
My pleasure and no problem :)
Join our real-time social learning platform and learn together with your friends!