Allright.
Lets follow what I wrote in my link, cutting that complicated formula into simpler pieces.
If you want to have an amount of 1 at the bank, N periods from now, with an interest perunage of i per period, then you need to put now an amount of (1 + i) ^-N. This period can be a month, or a quarter, or a year, whatever, as long as that interest perunage i belongs to that period (an interest perunage is just the interest, not per 100 as we usually denote it, but per 1; so 15% becomes 0.15). We denote this value now as 'the present value' of that amount 1, and we denote is with A(N, i).
In your exercise, the period is a month, the number of periods is 3 * 12 = 36, and the interest perunage per month = 0.15 / 12.
Also, if you have a series of payments 1, at the times 1, 2, 3, 4, ..., N, then the present value of these payments at time 0 is:
1 * A(1, i) + 1 * A(2, i) + ... + 1 * A(N, i)
We denote this value as a(N, i) (you see that in the actuarial world, case DOES matter, like in
Java). Since we have that
A(n, i) * A(m, i) = A(n + m, i)
we can simplify this a(N, i) to
a(N, i) = ( 1 - A(N, i) ) / i
Now, if the payment is not 1 per period, but P, then what is the present value of these payments P?
Lets program what we have. First:
And finally:
the payment each month P = monthSalary * 0.6, if that is at least 50_000, the number of periods is 3 * 12 = 36, and the perunage per month = 0.15 / 12.
The present value of all these P's is P * a(36, 0.15 / 12), and so that is the loan that you can get.
Can you give it a try? And also, can you verify that my a(N, i) is exactly that complicated right-hand part of the formula that is given to you? Your teacher will probably ask for this ;)