Answered step by step
Verified Expert Solution
Question
1 Approved Answer
the principal, interest rate and yearly payments are to be provided as inputs. only one payment can be made every year and the yearly balance
the principal, interest rate and yearly payments are to be provided as inputs. only one payment can be made every year and the yearly balance should be displayed before processing the yearly payment. The interest rate is applied yearly to the loan balance after the yearly payment is made. I keep getting this output when i run this program. I need the current loan balance to decrease every year, not increase. For example, i enter as the principal, interest rate as and then the current balance should be Then i enter the yearly payment as then the current balance should be after i enter the yearly payment as the loan balance should be then i enter the yearly payment as the current loan balance should be i enter as the yearly payment again and now the current loan balance is then i enter the yearly payment as So the number of years needed to pay off the loan is How can i get this program to look like the output in the image I gave below?
I dont need to initalize anything in this program. The principal, interest rate and yearly payment should be provided as inputs, as well as the current loan balance should be displayed before processing the yearly payment. The output should look exactly like the one in the image when I run the program. The expected inputoutput behavior of the program is illustrated below for one example input:
Enter principal: $
Enter interest rate:
Current loan balance: $
Enter yearly payment: $
Current loan balance: $
Enter yearly payment: $
Current loan balance: $
Enter yearly payment: $
Current loan balance: $
Enter yearly payment: $
Current loan balance: $
Enter yearly payment: $
Number of years needed to fully pay the loan:
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