0

Guys i need your help im new in java programming them asked me to solve the Loan calculator program

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 amount =20000; remain =18000; if(amount % remain == o) System .out.println (amount + remain / 2); } }

16th Mar 2022, 11:06 AM
MR KINGSHOW
MR KINGSHOW - avatar
2 Réponses
+ 2
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int amount = scanner.nextInt(); int loan; //your code goes here for(int i = 1; i <= 3; i++) { loan = amount / 10; amount -= loan; } System.out.println(amount); } }
16th Mar 2022, 11:11 AM
Fuchsia
Fuchsia - avatar
0
Fuchsia thank you broo
16th Mar 2022, 11:18 AM
MR KINGSHOW
MR KINGSHOW - avatar