package com.company; import java.text.DecimalFormat; import java.util.Scanner; public class Main { public static void main(String[] args) { // write your code here Scanner sc=new Scanner(System.in); double money=sc.nextDouble(); double year=sc.nextDouble(); double rate=sc.nextDouble(); DecimalFormat df=new DecimalFormat("0.00"); double interest=money*Math.pow(1+rate,year)-money; System.out.println("interest="+df.format(interest)); } }