- 1

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%

How can I solve?

3rd Jun 2021, 8:23 AM
Programer A.H
18 odpowiedzi
+ 3
Why not working formula (amount/100)*10?
18th Jun 2021, 5:39 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 1
Refer below link: ________________ https://brainly.in/question/31026653 https://www.chegg.com/homework-help/questions-and-answers/take-loan-friend-need-calculate-much-owe-6-months-going-pay-back-10-remaining-loan-amount--q65530175 Hope this helps. =================== Note: --------- 1. Always show your attempts before asking any question here. 2. Use search bar before asking any question here. https://www.sololearn.com/Discuss/2650540/you-take-a-loan-from-a-friend-and-need-to-calculate-how-much-you-will-owe-him-after-6-months-you-are Just have a look over Sololearn Community Guidelines: https://www.sololearn.com/Discuss/1316935/?ref=app
3rd Jun 2021, 9:11 AM
‎ ຸ
+ 1
Programer A.H All the information you require to solve the challenge will be in your previous lessons. Just review those lessons and compare them to the challenge requirements
3rd Jun 2021, 10:18 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
Cal Woods Better to post a separate question of your own instead of piggy backing onto another. More people will see it, and you will get a better response
18th Jun 2021, 3:31 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
I had actually copied it down to look at when I had a chance. My suggestion was to help you get some-one who is better than me at Java. Looks like you are on your own now
18th Jun 2021, 4:39 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
Yaroslav Vernigora I think so decimal issues
18th Jun 2021, 9:20 AM
Atul [Inactive]
0
Hi! Please, show us your code attempt! Thx!
3rd Jun 2021, 8:41 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
Seems to be your homework anyways post what you have tried
3rd Jun 2021, 9:00 AM
Atul [Inactive]
0
your assignment is now property
3rd Jun 2021, 9:03 AM
Rellot's screwdriver
Rellot's screwdriver - avatar
0
I would like to know what I did wrong as well. My code works for the first two tests but not for the rest. Here is my code: import java.util.Scanner; public class main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int amount = scanner.nextInt(); for (int i = 0; i < 3; i++) { amount = amount - amount / 100 * 10; } System.out.println(amount); } } Any help is appreciated. :)
17th Jun 2021, 11:33 PM
Cal Woods
Cal Woods - avatar
0
Cal Woods Are you asking about the code coach?
18th Jun 2021, 5:05 AM
Atul [Inactive]
0
Sort of, I would like to know why this code passed the first two tests but not the other three. What do you think?
18th Jun 2021, 5:07 AM
Cal Woods
Cal Woods - avatar
0
Cal Woods when I enter 12000. I get the result 8750. Not 8748
18th Jun 2021, 5:13 AM
Atul [Inactive]
0
Instead of 8748. I am not sure but I think this is the game of decimals
18th Jun 2021, 5:14 AM
Atul [Inactive]
0
amount = amount - (amount * 10)/100; Just use this line
18th Jun 2021, 5:16 AM
Atul [Inactive]
0
Ill try it, cheers
18th Jun 2021, 5:17 AM
Cal Woods
Cal Woods - avatar
0
Atul that worked, thanks
18th Jun 2021, 7:05 AM
Cal Woods
Cal Woods - avatar
0
Thank you so much I solved it
18th Jun 2021, 7:29 AM
Programer A.H