import java.util.Scanner;

class Sep20 {
	public static void main(String[] args) {

		Scanner kb = new Scanner(System.in);


		// infinite loop
		while(true){
 
			System.out.println("enter choice");
			System.out.println("1 say hi");
			System.out.println("2 exit");

			int choice = kb.nextInt();

			if (choice == 1) {
				System.out.println("hi");
			}
			else if (choice == 2) {
				return;
			}
		}


		/*

			do {


			} while(boolean_expr);

		*/

		int choice = 0;
		do {
			System.out.println("enter choice");
			System.out.println("1 say hi");
			System.out.println("2 exit");

			choice = kb.nextInt();

			if (choice == 1) {
				System.out.println("hi");
			}

		} while(choice != 2);

	}
}

// end of file
