import java.util.Scanner;

class Feb20 {

	public static void main(String[] args) {

		// print range of numbers

		int lowerBound = 1;
		int upperBound = 10;

		int currentValue = lowerBound;
		while(currentValue <= upperBound) {
			System.out.printf("%d", currentValue);
			if(currentValue < upperBound) {
				System.out.print(",");
			}
			currentValue++;
		}
		System.out.println();

		
		// compute sum of numbers

		currentValue = lowerBound;
		int sum = 0;

		while(currentValue <= upperBound) {
			sum = sum + currentValue;
			currentValue++;
		}
		System.out.printf("sum 1 - 10: %d\n", sum);

		// count how many multiples of 5 from 1 to 100

		upperBound = 100;
		int count = 0;
		currentValue = lowerBound;

		while(currentValue <= upperBound) {
			if(currentValue % 5 == 0) {
				count++;
			}

			currentValue++;
		}
		System.out.printf("count div by 5: %d\n", count);

		// repeatedly print a menu

		Scanner kb = new Scanner(System.in);	
		int choice = 1;		
		boolean done = false;

		while(true) {
			printMenu();
			choice = kb.nextInt();

			// act on value in choice
			switch(choice) {
				case 0:
					done = true;
					break;	
				case 1:
					System.out.println("adding");
					continue;
				case 2:
					System.out.println("Subtracting");
					continue;
				default:
					System.out.println("Invalid option.");			
			}

			if (done) {
				break;		
			}
		}

		System.out.println("Thank you for using our app.");
	
	}

	public static void printMenu() {
		System.out.println("1. Add");
		System.out.println("2. Subtract");
		System.out.println("0. Exit");
		
		System.out.print("Enter choice: ");
	}

}
