Complete listing of Listing 4

    //Note the negation operator in the following
    // statement.
    while(! ((temp >= 'A') && (temp <= 'Z')) ){
      //Outside allowable character range
      cout << "Bad input" << endl;
      cout << "Enter an upper-case letter: ";
      cin >> temp;
    }//end while loop
    
Listing 4