System.out.print("1. Final Amount\n2. Inital Amount\n3. Half-life (constant)\nFind: "); //Ask which equation to do
double n, y, k, t; //Initalize intial mass, final mass, half-life and time in that order
switch (input.nextInt()) { //Switch the input from the user
case 1: //If user entered 1 (final mass)
System.out.print("Enter the inital mass: "); //Ask user for inital mass
n = input.nextDouble(); //Collect inital mass from user
System.out.print("Enter the time (years): "); //Ask user for time (years)
t = input.nextDouble(); //Collect time (years) from user
System.out.print("Enter half-life (Constant): "); //Ask user for half-life
k = input.nextDouble(); //Collect half-life from user
y = n / Math.exp((-k*t)); //Calculate final mass