Monthly Payments

The monthly payment on a loan may be calculated by the following formula:

Payment = (Rate * (1+rate)^n)/((1+Rate)^n - 1) * L

Rate is the monthly interest rate, which is the annual interest rate divided by 12. (12% annual interest would be 1 percent monthly interest.) N is the number of payments and L is the amount of the loan. Write a program that asks for these values and displays a report similar to.

Loan Amount: $ 10000.00
Monthly Interest Rate: 1%
Number of Payments: 36
Monthly Payments $ 332.14
Amount Paid Back: $ 11957.15
Interest Paid: $ 1957.15
I have to arrange everything by decimal place

note. 1% is the last number (after the decimal place)
number of payments is also behind the decimal
I could not really get what you meant in the decimal part... Anyway I hope these topics will help you:
http://recurseit.blogspot.com/2011/09/right-align-your-output.html
http://recurseit.blogspot.com/2011/09/how-to-set-precision.html

Rest of the program is mere input/output statements, Try writing it yourself..
It means the decimal places have to be alligned in on line
You can easily do that with right manipulator. Its in the link I gave you...
Topic archived. No new replies allowed.