private void analysisMenu() throws InterruptedException {

    System.out.println();
    println("Choose an option or enter any integer to go back:");
    println("0: Empirical formula using percent composition");
    println("1: Empirical formula using mass composition");
    println("2: Molecular formula from empirical formula");
    println("3: Empirical formula from molecular formula");
    println("4: Molar mass of a formula");
    println("5: Mass of a formula");
    println("6: Number of atoms in a formula");

    switch (input.nextInt()) {

      case 0:
        empiricalFormulaPercentMenu();
        break;

      case 1:
        empiricalFormulaMassMenu();
        break;

      case 2:
        molecularFormulaMenu();
        break;

      case 3:
        empiricalFormulaMolecularMenu();
        break;

      case 4:
        molarMassMenu();
        break;



      case 5:
        massMenu();
        break;

      case 6:
        numAtomsMenu();
        break;

      default:
        // Return to main menu
        mainMenu();

    }
    mainMenu();
  }