I have a problem that has to be an interactive programs that accepts values for loan amount, yearly interest rate, and monthly payment amount from the terminal and then computes and displays on the monitor screen a loan repayment table. I have no idea how to start. I have to use at least one function but I'm not sure what needs to be a function or how many I need. Or how do I make a table that computes and displays the

loan table? Do I have to come up with a function? I don't want you to do it for me but instead kinda walk me through what I should do.

Here's the program's sample output:

Problem Statement: Develop an interactive program that accepts values for loan amount, yearly interest rate, and monthly payment amount from the terminal and then computes and displays on the monitor screen a loan repayment table. Implementation Details:

Monthly interest is computed on the beginning balance as

(beginning balance) * (interest rate)/12

Principal is obtained by subtracting monthly interest from monthly payment.

Ending balance is beginning balance minus principal paid.

The beginning balance for a month is the same as the ending balance for the previous month.

When the beginning balance for a month becomes less than or equal to the monthly payment amount, no interest is charged and the monthly payment is considered as the principal amount. In this case the monthly payment will be the final payment on the loan.

If the entered value for monthly payment is less than the computed monthly interest, the loan will never be repaid. Therefore, your program should print a message telling the user that the monthly payment is too small and asking the user to enter a larger value.

Output Example: Your program execution should have the same layout.

Enter loan amount: 10000

Enter yearly interest rate: 0.1790

Enter monthly payment: 30.00

***> Monthly payment is too small.

Enter monthly payment: 1000.00

LOAN REPAYMENT TABLE

Beginning Balance Payment Interest Principal Ending Balance

-------------------------- ----------- ------------- ------------ - --------------------

10000.00 1000.00 149.17 850.83 9149.16

9149.16 1000.00 136.47 863.52 8258.64

…………………..

…………………..

897.21 897.21 0.00 897.21 0.00 -

------------------------------------------------------------------------------------------------