title: Investing Calculator
body: <p>Hey I've built this code so far to do compound interest over the course of x years but I Do Not know How to include a "x amount of dollars per year added to the funds." So If I make my variable $70,000 it will compound interest for x amount of years, the difficulty is in adding "y amount of dollars each year, along with the initial amount invested." Code posted Below</p>
  
  <pre><code> import java.util.*;
  //Feel Free To Steal My Code  Sincerely Minotaur,
  
  public class Investing {
  
  public static void main (String[] args){
  
          Scanner input1 = new Scanner(System.in);
  
          double amount;
  
          double principal;
  
          double rate;
  
          System.out.println("Please Enter The Principal");
          principal = input1.nextDouble();
  
          System.out.println("Please Enter The Rate Of Interest In Decimal Form");
          rate = input1.nextDouble();
  
          System.out.println("Please Enter The Number Of Investment Years");
          Scanner input2 = new Scanner (System.in);
          int g = input2.nextInt();
  
          for(int year = 1; year &lt;= g; year++){
              amount = principal * Math.pow(1 + rate, year);
              System.out.println(year + "  " + amount);
  
          }           
      }       
  }
  </code></pre>