开方:math.sqrt(double n); 求平方,立方: Math.pow(x,2)就是平方。 Math.pow(x,3)就是立方 转载于:https://www.cnblogs.com/danscarlett/p/4512957.html