UNB/ CS/ David Bremner/ teaching/ java/ ReadAge1.java
import ccj.*;

public class ReadAge1
{  public static void main(String[] args)
   {  System.out.print("Please enter your age: ");
      int age = Console.in.readInt();
      if (age < 0)
      {  System.out.println
            ("Error: age cannot be negative");
         return;
      }
      /* now we know that age is >= 0 */

      System.out.println("The square root of your age is "
         + Math.sqrt(age));
   }
}