import java.util.Scanner;

public class L10 {

	public static void main(String[] args) {

		// determine the length of a string
		String firstName = "Eric";
		int len = firstName.length();
		System.out.println("length of string: " + len);

		Scanner kb = new Scanner(System.in);

		// compute how many words a user enters
		// before they enter the word "stop"


		int counter = 0;
		while(true) {
			System.out.print("Please enter word: ");
			String word = kb.next();
			if (word.equals("stop")) {
				break;
			}
			counter++;
		}
		System.out.println("\ncounter: " + counter);

		// compute how many integers a user enters
		// before they enter 7

		counter = 0;
		while(true) {
			System.out.println("Please enter an integer");
			int input = kb.nextInt();
			if (input == 7) {
				break;
			}
			counter++;
		}
		System.out.println("\ncounter: " + counter);

		// count how many times the user enters a character
		// before they enter the character Z

		counter = 0;
		while(true) {
			System.out.println("Please enter a character");
			String input = kb.next();
			char c = input.charAt(0);	
			if (c == 'Z' || c == 'z') {
				break;
			}
			counter++;
		}
		System.out.println("\ncounter: " + counter);

		for(int i = 10; i >= 5; i--){
			System.out.println(i);
		}
	} // END OF MAIN
} // END OF CLASS
