import java.util.Scanner;

class Lecture {

	public static void main(String[] args) {

		Scanner kb = new Scanner(System.in);

		/*
		 * example using the continue and break keywords
		 * code will break out of while loop if user enters -1
		 * otherwise, code will print even numbers but skip
		 * the print if number is odd
		 */

		while(true) {
			System.out.println("enter integer");
			int input = kb.nextInt();

			if (input == -1) {
				break;
			}

			if (input % 2 == 1) {   // input is odd
				continue;
			}

			System.out.println("is even: " + input);
		}

		/*
		 * Example using switch statement
		 */
		
		System.out.println("enter integer");

		int input = kb.nextInt();

		switch(input) {
			case 1:
				// do addition
				break;
			case 2:
				// do subtraction
				break;

			case 6:
				return;
			default:
				System.out.println("invalid option");
		}
	}
}
