
/**
 *
 * @author Damien Bell <SkyeShatter@gmail.com>
 */
import java.util.Scanner;
class Jtutorial1 {
    public static void main(String args[]){
       Scanner input = new Scanner(System.in);
       
       //Asks a user for how much money they want to invest in a bank
       //What is the APR of that bank. Annual percentage rate.
       //How long do you want to invest the money for.
       //i = p*r*t.  interest = principle (starting investment)*(rate)*(time--in years)
       
       System.out.println("How much money are you interested in investing: ");
       double principle = input.nextDouble();
       
       System.out.println("\nWhat is the APR offered at this bank? (5.9% = 5.9):  ");
       double rate = input.nextDouble();
       //rate = rate /100;
       rate /= 100; //Same as above.
       
       System.out.println("\nHow long do you want to invest this money for? ");
       int Time = input.nextInt();
       
       double total = principle * (1+rate*Time);
       
      // System.out.println("\nThe total amount of money in the account after: " + Time + " years is: " + total); // Same as below but without using total variable.
       System.out.println("\nThe total amount of money in the account after: " + Time + " years is: " + (principle * (1+rate*Time)));
       
       
       
       
       
    } //End main
} //End class
