JAVA贷款计算

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("请输入金额");
int amount = sc.nextInt();    
System.out.println("请输入利率");
double rate = sc.nextDouble(); 
double rate1 = rate*0.01;
System.out.println("请输入年数");
int year = sc.nextInt();    
double payment=amount*rate1*year;
System.out.println("您要支付的利息:");
System.out.println((int)(payment) ) ;
	  }