The Loan Calc problem in Java | SoloLearn: Learn to code for FREE!

+2

The Loan Calc problem in Java

Hi everyone, I have been trying to solve this loan calc problem for Java. It is for the loops section. Not sure what am I missing here. The hidden test cases fail and. I am unable to complete my certificate since this problem is not solved. Please let me know if any of you faced it also and how did you get it resolved. import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int amount = scanner.nextInt(); int i = 0; //your code goes here if (amount > 0){ while( i <3){ amount = amount - (amount/100 * 10); i++; } System.out.println(amount); } } }

4/13/2021 5:21:50 AM

Sapna Singh

3 Answers

New Answer

+2

Hope this helps you

+1

https://www.sololearn.com/discuss/2604391/?ref=app https://www.sololearn.com/discuss/2681400/?ref=app https://www.sololearn.com/discuss/2680282/?ref=app https://www.sololearn.com/discuss/2660363/?ref=app https://www.sololearn.com/discuss/2737889/?ref=app https://www.sololearn.com/discuss/2670258/?ref=app https://www.sololearn.com/discuss/2610459/?ref=app https://www.sololearn.com/discuss/2605192/?ref=app

0

thank you