import java.util.Scanner;

public class Menu
{
  public static void main(String args[])
  {
    char c;
    String  line;
    boolean done = false;
    Scanner kb = new Scanner(System.in);
    int num1, num2;

    while(!done)
    {
      System.out.print("Enter G for a greeting, A to add 2 numbers, Q to quit");
      line = kb.nextLine();
      c = line.charAt(0);
      switch(c)
      {
case 'g':
case 'G': System.out.println("Hello");
        break;
case 'a':
case 'A': System.out.print("Enter first number");
        num1 = kb.nextInt(); 
        System.out.print("Enter second number");
        num2 = kb.nextInt(); 
        System.out.println("The sum is " + (num1 + num2));
        kb.nextLine();
        break;
case 'q':
case 'Q': done = true;
      }
    }
  }
}
