import java.text.*; 
  
public class AmortizationCalc2 
{ 
  public static void main(String[] argv) 
  { 
    // input values 
    double years = 10; 
    double D = 100; 
    // output (calculated) values 
    double p = 0.075 / 12; 
    double T = years * 12; 
    double S = D * ((Math.pow(1 + p, T) - 1) / p); 
    // echoing input values, unformatted 
    System.out.print("In " + years + " years, $"); 
    System.out.print(D); 
    System.out.print(" deposited per month will grow to $"); 
    // formatting output (see 4.2) 
    System.out.print(new DecimalFormat("#,000.00").format(S)); 
    System.out.println("."); 
  } 
}
