PLEASE HELP ME I AM REALLY STUCK. IF I CAN SEE SOMEONE SOLVE THIS IT WOULD HELP ME TO LEARN. THANKS ALOT | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 4

PLEASE HELP ME I AM REALLY STUCK. IF I CAN SEE SOMEONE SOLVE THIS IT WOULD HELP ME TO LEARN. THANKS ALOT

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 2 Payment: 10% of 18000 = 1800 Remaining amount: 16200 Month 3: Payment: 10% of 16200 = 1620 Remaining amount: 14580 Month 4: Payment: 10% of 14580 = 1458 Remaining amount: 13122 Month 5: Payment: 10% of 13122 = 1313 Remaining amount: 11809 Month 6: Payment: 10% of 11809 = 1181 Remaining amount: 10628

23rd Jan 2021, 9:56 AM
Ozemoka Shuaib Aloaye
Ozemoka Shuaib Aloaye - avatar
12 Answers
+ 6
Ozemoka Shuaib Aloaye , before we are going to help you, please present your attempt here. if you haven't done a try by yourself so far, please do so. create your code in playground and post the link to it here. thanks!
23rd Jan 2021, 10:13 AM
Lothar
Lothar - avatar
+ 5
Please show your attempt first.
23rd Jan 2021, 10:07 AM
Ezra Bridger 2207 [INACTIVE]
Ezra Bridger 2207 [INACTIVE] - avatar
+ 3
Ozemoka Shuaib Aloaye , you can post a code that does not work, no problem and this is nothing bad. it gives us hint about the level of your coding skills. so we can give you the help you need. if someone is giving you a working code as a sample, you can copy and paste from this, but it does not help you improving your coding level or problem solving ability. we only can learn by doing, coding, practicing, and we can learn from our mistakes. you have given a lot of information, but not a clear question. so if you still stuck, you should ask clear and purposeful questions. good success & happy coding!
23rd Jan 2021, 11:36 AM
Lothar
Lothar - avatar
+ 2
Ozemoka Shuaib Aloaye You can't expect others to just give you code 😑. Show your attempt.
23rd Jan 2021, 10:20 AM
aka :)
aka :) - avatar
+ 2
Ozemoka Shuaib Aloaye you haven't tried anything and what is with the question title in caps? You posted some code in python code playground as well when it should be in java code playground. If You have tried something then show us or tell about it like what are you actually stuck or don't understand from question? Question is simply saying what will be the amount left after you pay 10% of loan each month for 6 months, there is also an example input and output that shows how exactly it can be done. Maybe you are confused because you don't know how to calculate percentage amount of a sum or you lack basic understanding of java concepts !??
23rd Jan 2021, 11:02 AM
Abhay
Abhay - avatar
+ 1
MrDevEzeoke I have sent my "attempt" i was only asking for help doesnt me you would answer me with a rude tone
23rd Jan 2021, 10:31 AM
Ozemoka Shuaib Aloaye
Ozemoka Shuaib Aloaye - avatar
0
Okay but this stuff is really making me not wanna program anymore https://code.sololearn.com/clO70DbqdhOJ/?ref=app
23rd Jan 2021, 10:21 AM
Ozemoka Shuaib Aloaye
Ozemoka Shuaib Aloaye - avatar
0
Wasnt this Q&A DISCUSSIONS meant for question and answers. Cause you make it sound like i said something wrong. Wouldn't you think before you code i tried to assimilate it but then i wrote something it didnt work . so i deleted it. And i kept on thinking before i decided to help
23rd Jan 2021, 10:33 AM
Ozemoka Shuaib Aloaye
Ozemoka Shuaib Aloaye - avatar
0
Ozemoka Shuaib Aloaye I was not trying to show rudeness to you. You need to understand that. I was actually trying to figure out your issue. 1. I noticed you used the Python compiler instead of the Java one which is the obvious problem.
23rd Jan 2021, 11:49 AM
aka :)
aka :) - avatar
0
Okay i understand now
23rd Jan 2021, 8:27 PM
Ozemoka Shuaib Aloaye
Ozemoka Shuaib Aloaye - avatar
0
And also i don't even understand how i am going to use loops to solve the problem. I have trued manually and then i didn't work so i deleted it
23rd Jan 2021, 8:27 PM
Ozemoka Shuaib Aloaye
Ozemoka Shuaib Aloaye - avatar
0
https://code.sololearn.com/cB43nky2VP65/?ref=app This js the java. I have tried enough
23rd Jan 2021, 8:45 PM
Ozemoka Shuaib Aloaye
Ozemoka Shuaib Aloaye - avatar