//********************************************************************
// Demonstrates the use of a basic while loop
//********************************************************************

import cs1.Keyboard;

public class While1
{
   //-----------------------------------------------------------------
   //  Reads an even number from the user and prints comments accordingly.
   //-----------------------------------------------------------------
   public static void main (String[] args)
   {
      int tom;

      System.out.print ("Enter an even integer: ");
      tom = Keyboard.readInt();

      while(tom % 2 == 1) {
            System.out.print ("try again to enter an even integer: " );
	    tom = Keyboard.readInt();
      }
      System.out.println ("thanks---bye now");
   }
}
