1 import java.util.Scanner; 2 3 public class Solution 4 { 5 public static void main(String[] args) 6 { 7 Scanner input = new Scanner(System.in); 8 9 System.out.print("Enter investment amount: "); 10 double investmentAmount = input.nextDouble(); 11 12 System.out.print("Enter annually interest rate: "); 13 double annuallyRate = input.nextDouble(); 14 15 System.out.print("Enter number of years: "); 16 int numberOfYears = input.nextInt(); 17 18 double futureInvestmentValue = investmentAmount * Math.pow((1 + annuallyRate / 1200), (numberOfYears * 12)); 19 20 System.out.println("Accumulated value is " + futureInvestmentValue); 21 22 input.close(); 23 } 24 }