Need help with loan problem | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Need help with loan 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. Sample Input: 20000 Sample Output: 10628 Here is the monthly payment schedule: Month 1 Payment: 10% of 20000 = 2000 Remaining amount: 18000 Month 2 Payment: 10% of 18000 = 1800 Remaining amount: 16200 Month 3: Payment: 10% of 16200 = 1620 Remaining amount: 14580

12th Jul 2021, 1:20 AM
Nicole Aragon
Nicole Aragon - avatar
2 Answers
+ 3
Hi Nicole Aragon Please show your attempts??
12th Jul 2021, 2:00 AM
Abhiyantā
Abhiyantā - avatar
- 1
I think ther is an error in your question in place of 3 months you should put 6 months. https://code.sololearn.com/ca23187307a2
12th Jul 2021, 1:49 AM
Abhishek Kumar
Abhishek Kumar - avatar