So the program is to take the amount the consumer wants, the interest rate, and the loan duration. It is then to calculate the face value required in order for the consumer to receive the amount needed.
Suppose a loan has a face value of $1000, the interest rate is 15%, and the duration is 18 months. The interest is computed by multiplying the face value by 0.15 to get $150. That figure is then multiplied by the loan period of 1.5 years to yield $225 as the total interest owed. That amount is immediately deducted from the face value, leaving the consumer with only $775. This calculation may be ok if the consumer need $775, but the calculation is a bit more complicated if the consumer needs $1000.