0
Can anyone explain the loan calculation by using an example for java coding?
1 Odpowiedź
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);
}
}