import java.util.Scanner;

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

		Scanner kb = new Scanner(System.in);

		System.out.println("please enter an integer");
		int num = kb.nextInt();

		/* Print the numbers between 1 and num */

		int lowerBound = 1;

		// while-loop
		while(lowerBound <= num) {
			System.out.println(lowerBound);
			lowerBound++;
		}

		System.out.println("done with loop");

		/* Print even numbers between 1 and num */

		lowerBound = 1;	
		while(lowerBound <= num) {
			if (lowerBound % 2 == 0) {
				System.out.println(lowerBound);
			}
			lowerBound++;
		}
		System.out.println("done with loop");

		/* Print multiples of 3 */

		lowerBound = 1;	
		while(lowerBound <= num) {
			if (lowerBound % 3 == 0) {
				System.out.println(lowerBound);
			}
			lowerBound++;
		}
		System.out.println("done with loop");

		/* get user input for menu */

		boolean stop = false;

		int option = 0;
		while(!stop) {
			System.out.println("choose one of the following:");
			System.out.println("[1] say hi");
			System.out.println("[2] exit loop");

			option = kb.nextInt();

			if(option == 1) {
				System.out.println("hi");
			}
			else if (option == 2) {
				break;
			}			
		}
		System.out.println("done with loop");
		System.out.println("last option user typed: " + option);


		stop = false;

		option = 0;
		while(!stop) {
			System.out.println("choose one of the following:");
			System.out.println("[1] print hi");
			System.out.println("[2] print menu");
			System.out.println("[3] exit loop");

			option = kb.nextInt();

			if(option == 1) {
				System.out.println("hi");
				continue;
			}
		
			if (option == 2) {
				continue;
			}
		
			if (option == 3) {
				break;
			}			
		}
		System.out.println("done with loop");
		System.out.println("last option user typed: " + option);




	}
}

// end of file
