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


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(; 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


Hope this helps you



thank you