
import java.io.*;
import java.util.*;

class ScannerDemo {

  public static void main(String[] args) throws IOException {
    Scanner sc = new Scanner(new InputStreamReader(System.in));
    String wrd;
    int low, high;

    System.out.print("shortest word length? ");	
    low = sc.nextInt();

    System.out.print("longest word length? ");	
    high = sc.nextInt();
    
    for (int i=0; i<(high-low); i++) {
      System.out.print("type a word: ");
      wrd = sc.next();
      System.out.println(wrd);
    }
   
    while (true) {
      // Display a prompt to the user
      System.out.print("Want to quit? (type 'yes' to quit)");	
      // Read a reply from the user...
      wrd = sc.next();
      // if the user types the word "quit", we will break the loop
      if ( wrd.equals("yes") ) {  break; }
    }
  }

}

