0

Can anyone explain the loan calculation by using an example for java coding?

14th Jul 2022, 3:28 PM
Nasroon Fareeha
Nasroon Fareeha - avatar
1 Answer
0
This code worked: 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 remaining = amount; for (int i = 1 ; i <= 6 ; i++) { int paid = (int)Math.ceil(remaining); remaining = paid ; } System.out.println(remaining*729/1000); } }
14th Jul 2022, 6:03 PM
Prajjwal Gurav
Prajjwal Gurav - avatar