import java.util.Scanner;

class Practice {

	public static void main(String[] args) {

		Scanner kb = new Scanner(System.in);		

		while(true) {

			// print menu
			printMenu();

			// get command from user
			String command = kb.next();
			// get operands
			
			// switch on the command

			double op1;
			double op2;

			switch(command) {

				case "add":
					op1 = kb.nextDouble();
					op2 = kb.nextDouble();
					double result = add(op1, op2);
					System.out.printf("%f + %f = %f\n", op1, op2, result);
					break;
				//...

				case "quit":
					return;	
				default: 
					System.out.println("invalid command");
			}
		}
	}

	public static void printMenu() {
		System.out.println("add");
		System.out.println("...\nenter command:");
	}

	public static double add(double arg1, double arg2) {
		return arg1 + arg2;
	}

}
