- 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?
18 Respostas
+ 3
Why not working formula (amount/100)*10?
+ 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
+ 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
+ 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
+ 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
+ 1
Yaroslav Vernigora I think so decimal issues
0
Hi! Please, show us your code attempt! Thx!
0
Seems to be your homework anyways post what you have tried
0
your assignment is now property
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. :)
0
Cal Woods Are you asking about the code coach?
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?
0
Cal Woods when I enter 12000. I get the result 8750. Not 8748
0
Instead of 8748. I am not sure but I think this is the game of decimals
0
amount = amount - (amount * 10)/100;
Just use this line
0
Ill try it, cheers
0
Atul that worked, thanks
0
Thank you so much
I solved it