throws IOException
{
System.out.println("输入一个数字 : ");
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ;
String s ;
while((s = br.readLine()) != null)
{
Integer i = null;
try
{
i = new Integer(s) ;
}
catch (Exception ex)
{
System.out.println("输入的数字不正确 ! 输入一个数字:");
continue ;
}
System.out.println(i.intValue()+" 的立方是:" + Math.pow(i.doubleValue(), 3));
return;
}
}