//********************************************************************
// Demonstrates an alternative for-loop 
//********************************************************************

import cs1.Keyboard;

public class For2
{
   //-----------------------------------------------------------------
   //  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();

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