/*****************************************************************
** YDemoKeyboardInput2, same as YDemoKeyboardInput.java except
** using York.readInt() and York.readDouble()
**
** (c) Scott MacKenzie, 2000                             
******************************************************************/
import york.*;

public class YDemoKeyboardInput2
{
   public static void main(String[] args)
   {
      // get input from the keyboard
      York.print("Please enter your name: ");
      String name = York.readLine();

      System.out.print("Please enter your age: ");
      int age = York.readInt();

      System.out.print("Please enter the radius of a circle: ");
      double radius = York.readDouble();

      // operate on data
      age++;                                   // increment age
      double area = Math.PI * radius * radius; // compute circle area

      // output results
      York.println("Hello " + name);
      York.println("On your next birthday, you will be "
         + age + " years old");
      York.println("Area of circle is " + area);
   }
}

