HI! CAN ANYONE HELP ME IN A CODE COACH PROBLEM IN JAVA? THE LOAN CALCULATOR
You take a loan from a friend and need to calculate how much you will owe him after 6 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 6 months. Sample Input: 20000 Sample Output: 10628 Here is the monthly payment schedule: Month 1 Payment: 10% of 20000 = 2000 Remaining amount: 18000 Month 6: Payment: 10% of 11809 = 1181 Remaining amount: 10628 If you input 100000 just like the input in the problem, My answer is 53144.1 and then java rounds it up then it makes my answer 53145, the output is 53144. The one who created that problem must have made a mistake. I deserve XP if this is proven, I've spent 4 days solving this. My guess is the creator used a calculator to calculate the output. https://code.sololearn.com/ckbyObI2Ilz3/?ref=app