Question
Write a program that will tell you how many months it will take you to pay off the loan, as well as the total amount
Write a program that will tell you how many months it will take you to pay off the loan, as well as the total amount of interest paid over the life of the loan. Use a loop to calculate the amount of interest and the size of the debt after each month. Put out the monthly amount of interest paid and remaining debt. Use a variable to count the number of loop iterations and hence the number of months until the debt is zero. You may want to use other variables as well.
You are to hand in:
a Title page
a Hierarchy Chart
a fully commented Program Listing
3 sample runs (one run uses the above example, one run with your data, one run with invalid loan, interest rate and amount paid)
a Users Guide (showing Purpose, Sample Input, Sample Output, Assumptions/Limitations)
A sample session may run as follows:
Enter the amount of the loan 1000.00
Enter the yearly interest rate 18.0
Enter the monthly amount paid 50.00
Month Principle Interest Principle Remaining
Paid Paid Balance
1 1000.00 15.00 35.00 965.00
2 965.00 14.48 35.52 929.48
3 929.48 13.94 36.06 893.42
.
.
24 41.12 0.71 49.29 -2.17
Number of months to pay of the loan: 24
Total interest paid on loan: 197.83
You have a credit of: -2.17
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started