import java.util.Scanner;

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

		/* print ints between 35 and 45 - inclusively */

		int lower = 35;
		int upper = 45;

		int i = lower;
		while(i <= upper) {
			System.out.print(i + " ");
			i = i + 1;
		}
		System.out.println();		

		/* create Scanner to read from the keyboard */
		Scanner sc = new Scanner(System.in);

		/*
		 * print the input until the user presses -1
		 */
		int input;
		while(true) {
			System.out.println("Please enter an integer");
			input = sc.nextInt();

			if (input == -1) {
				break;						// break terminates the loop
			}

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

		System.out.println("Program ending");
	}
}
