0

Please explain logic to solve this problem..

You take a loan from a friend and need to calculate how much you will owe him after 3 months. You are going to pay him back 10% of the remaining loan amount each month. Create a program that takes the loan amount as input, calculates and outputs the remaining amount after 3 months.

14th Feb 2022, 12:54 PM
Ujawal Tiwari
Ujawal Tiwari - avatar
3 Answers
+ 2
You take money from a friend Let's say 100$ The first month you should pay him 10% of the remaining money, so you give him back 100$ * 10%= 10$ The remaining will be 90$, the next month you will pay 10% of the 90$, so you give back 9$. The remaining will be 81$, the third month you will pay 10% of the 81$, so you'll give back 8.1$. The remaining is 72.9$, this the remaining money you owe him after three months.
14th Feb 2022, 1:36 PM
Mohammed
+ 1
The logic is something like this: Loan = $n Payback amount #1 = 90% of $n Update $n Repeat
14th Feb 2022, 1:32 PM
Ausgrindtube
Ausgrindtube - avatar
0
Bro I want Source Code
17th Feb 2022, 3:05 PM
Aditya Kumar Singh
Aditya Kumar Singh - avatar