0

Loan Calculator

I don‘t understand, why this Code doesn’t work. import java.util.Scanner; public class Program { public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int amount = scanner.nextInt(); //your code goes here int months = 3; for (int i = 0; i < months; i++) { amount = amount * 90 / 100; System.out.println(amount); } } }

3rd Nov 2022, 5:59 AM
Andrej R
Andrej R - avatar
2 RĂ©ponses
+ 4
You should print outside the loop
3rd Nov 2022, 6:11 AM
AÍąJ
AÍąJ - avatar
+ 1
Now it works. Thx for Help!!!
3rd Nov 2022, 4:26 PM
Andrej R
Andrej R - avatar