0
Loan calculator
In question it is said that loan is claculates for 3 months so I'm iterating for 3 times. But it's giving error. Plz help me fixing it out . This is the code for loan calculator 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 for(i=0;i<3;i++){ amount -= (amount *10)/100; System.out.println(amount ); } } }
2 odpowiedzi
+ 2
Anjali Singh
You haven't declared the type for i
for(int i=0; etc....
+ 1
Yes I fixed it thanks.