2013年9月12日
摘要: import java.util.Scanner;import static java.lang.Math.*;/** * 熟悉数学计算中常用的一些数学函数 * 1、开平方:Math.sqrt() * 2、幂运算:Math.pow(x,a) * java中还提供了两个用于表示π和e常量的近似值: * Math.PI * Math.E * * 注意:Math类中的方法和字段都是static类型的 * Math.sqrt()、Math.pow(x,a)方法的返回值都是double类型 * 而且PI和E也是double类型 */public class TestMath{ /** *... 阅读全文
posted @ 2013-09-12 17:20 周先生他爸 阅读(338) 评论(0) 推荐(0)