This is my assignment

Get Monthly Income

Get Monthly Home Rent/Mortgage

Get Other Monthly Payments (alimony, child support, student loans)

Display Allowable Monthly Car Payment

Display Maximum Car Value (interest rate based on credit)

A customer can not exceed a debt load of 36% of their gross monthly income including house rent or a mortgage.

Example:

Good Credit = 10% interest

OK Credit = 16% interest

Bad Credit = 23% interest

I basically know how to code this. I get the information from the user (income, rent, and other monthly payments) and then ask if they have good, ok, or bad credit (this will be the percentage part) and I know mostly what to do, but the hardest part is the actuall coding part, basically the calculations part, im always confused on what to do, my example shows basically what to do and I know how to get the users info, but how to program the calculations, is where im also stuck at

My example is (the money for the income, rent, and other monthly payments the user entered already)

1. If there monthly Income is: $2,000.00

2. Monthly Home Rent/Mortgage: $500.00

3. Other Monthly Payments (alimony, child support, student loans): $100.00

4. Then there allowable Monthly Car Payment:

( 36% of 2,000 (income) = 720)

( now I subtract debts 720 - 500 (rent) - 100 (other) = 120) : $120.00

5. Display Maximum Car Value (interest rate based on credit):

Present Value Function (16% per year (this is where I check one of the boxes for the credit, which in this case its an ok credit), 6 years (I have to keep it at 6 years), 120 (this is the allowable monthly car payment) per month)

So basically PV((0.16 / 12), (6 * 12), 120) : $5532.03

can someone help me out on the coding / calculation part please