Loan calculator Java.
Hi, I've been trying to complete the lean calculator on java. I'll get cases 1,2, and 5 right but 3 and 4 wrong. I'm not sure why or how. A friend said that it's a rounding issue however I can't see cases 3 and 4 because of the paywall. Any help on why this is wrong would be great. The answer has to be an integer and it has to calculate for out to 6 months. import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); double amount = scanner.nextInt(); for(int x = 0; x < 6; x++){ //this is where u set the counter for the months up amount*=.90;// this is where the loan is calculated } System.out.println ((int)amount); //this is converting amount into an integer. } }