/*****************************************************************
** CubeIt - prompt the user for an integer (0-10), then cube it
** 
** (c) Scott MacKenzie, 2000                             
******************************************************************/
import java.io.*;

public class CubeIt
{
   private static final int[] CUBE =
      { 0, 1, 8, 27, 64, 125, 216, 343, 512, 729, 1000 };

   public static void main(String[] args) throws IOException
   {
      BufferedReader stdin =
         new BufferedReader(new InputStreamReader(System.in), 1);

      System.out.print("Enter an integer from 0 to " +
         (CUBE.length - 1) + ": ");

      int n = Integer.parseInt(stdin.readLine());

      if (n >= 0 && n < CUBE.length)
         System.out.println("It's cube is " + CUBE[n]);
      else
         System.out.println("Value out of range!");
   }
}

