// A class to compute squares and cubes of ten consecutive numbers // based on user input // Kelli Wiseth // 19-May-2004 // Platform: Wintel [Windows 2000] // JDK version: JDK 1.4.1 // //****************************************************************************** import java.io.*; class Cubes { public static void main (String[] args) throws IOException { BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); int index; int max_value; String input_value; System.out.println("Enter a whole number:"); input_value=stdin.readLine(); index= Integer.parseInt(input_value); max_value= Integer.parseInt(input_value)+10; //max_value=index+10; System.out.println("Number Square Cube"); for (index=index; index<=max_value; index++) System.out.println(index + " " + index*index + " " + (index*index*index)); }//main }//class