INPUT:
- outstanding balance
- monthly payment
- basic interest per year
- net income
- amount
OUTPUT:
- financial state
- the number of month
- total amount of interest
CONSTRAINTS:
- The monthly payment is not less than 5% from the outstanding balance
- An extra interest, 3% will be included if the number of months exceeds 12 months
PROCESS & FORMULA:
- calculate the basic interest per month: basic interest = (interest rate/12)/100
- calculate the payment for every month (month<=12): outstanding balance= outstanding balance*(1 + basic interest) โ monthly payment
- calculate the new interest after 12 months: new interest = basic interest + (0.03/12)
- calculate the payment after 12 months: outstanding balance = outstanding balance*(1 + new interest) โ monthly payment
- calculate the total amount of interest if number of months is less than or equal to 12 months : total amount of interest = amountbasic interestmonth
- calculate the total amount of interest if number of months is more than 12 months : total amount of interest = amount * new interest * month
- calculate the financial status financial status = (monthly payment/net income)*100