<p>1. Write a basic program to calculate the monthly payment and the total cost
ID: 3638398 • Letter: #
Question
<p>1. Write a basic program to calculate the monthly payment and the total cost for a student loan. The program should input the total amount of the loan, the interest rate and the time to repay.<br />The monthly payments for a loan of loan dollars for m months at a monthly interest rate of interest is:<br />payment=loan[interest(1+interest)^m/(1+interest)^m -1]<br /><br />The interest rate and the time period used in the equation are monthly. Most people have student loans for years. Your program should ask the user the number of years of the loan and then multiply that value by 12 to get the number of months. Interest rates are generally thought of as annual percentages. Your program should read an annual percent, divide it by 100 to get a fraction and then divide it by 12 to get the monthly interest rate.</p><p><br />Once you know the monthly payment amount, you can multiply that by the number of months to get the total amount the student will have to pay. If you subtract the original amount of the loan from the total paid, you get the cost of borrowing the money.</p>
<p><br />Imagine you borrow $10,000 a year for four years to finance your education. Student loan rates are now about 3.4% and the maximum payback time is 10 years. Using this data, your program should provide results similar to this:<br />Enter the total amount of the loan >40000.00<br />Enter the annual interest rate as a percent >3.4<br />Enter the number of years to repay >10<br />Monthly payments will be $393.6724264811499<br />Total paid will be $47240.69117773799<br />Cost of the loan is $7240.691177737986</p>