import java.util.Scanner;

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

		Scanner kb = new Scanner(System.in);
		System.out.println("Enter two integers: ");
	
		int lowerBound = kb.nextInt();
		int upperBound = kb.nextInt();

		
		// compute the sum of values between lowerBound
		// and upperBound

		int nextNumber = lowerBound;
		int sum = 0;
		while(nextNumber <= upperBound) {
			sum = sum + nextNumber;
			nextNumber++;
		}

		System.out.println("Sum: " + sum);

		// count the number of integers that are even 
		// between the bounds

		int counter = 0;
		nextNumber = lowerBound;
		while(nextNumber <= upperBound) {
			if(nextNumber % 2 == 0) {
				counter++;
			}
			nextNumber++;
		}
		System.out.println("Num even: " + counter);

		// get user choice in loop

		while(true) {

			System.out.print("Enter choice [1]add, [2]exit: ");
			int choice = kb.nextInt();

			if(choice == 1) {
				System.out.println("pretend we're adding");
			}
			else if (choice == 2) {
				break;  // breaks prog out of innermost loop
			}
			else {
				System.out.println("invalid choice");
			}
		}

		// do while loops

		int choice = 0;	
		do {
			System.out.print("Enter choice [1]add, [2]exit: ");
			choice = kb.nextInt();

			if(choice == 1) {
				System.out.println("pretend we're adding");
			}
			else if (choice != 2) {
				System.out.println("invalid choice");
			}
		} while (choice != 2);


	}
}
