import java.util.Scanner;

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

		Scanner kb = new Scanner(System.in);

		/* infinite loop

		while(true) {
			System.out.println("looping...");
		}

		*/

		int choice = 0;
		while(choice != 2) {
			System.out.println("1) Continue");
			System.out.println("2) Exit");

			System.out.print("Enter choice: ");
			choice = kb.nextInt();
		}

		// execute block of code a finite number
		// of times

		int count = 0;
		while(count < 3) {
			System.out.println("hello");		
			//count = count + 1;
			count++;
		}
		
		// do arithmetic - pow

		System.out.print("Enter base: ");
		int base = kb.nextInt();

		System.out.print("Enter exponent: ");
		int exp = kb.nextInt();

		int product = 1;

		count = 0;
		while(count < exp) {
			//product = product * base;
			product *= base;
			count++;
			//count += 1;

		}
		System.out.printf("%d^%d=%d\n",base,exp,product);
	
		// do-while

		do {
			System.out.println("1) Continue");
			System.out.println("2) Exit");

			System.out.print("Enter choice: ");
			choice = kb.nextInt();

		} while (choice != 2);











	

	}
}
