+ 1
Loan calculater app
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 x=0; int y; while (x<6){ y=amount*10/100; amount = amount -y; System.out.println ("amount :"+amount); x++; } } } In lesson 10 (learn java) the example above for loan calculator and I wrote code but got error in excute can some one help?
2 Respuestas
+ 3
ali musadaq You have to initialize y with 0