package 数据类型;//动态初始化class DynInit { public static void main(String args[]){ double a = 3.0, b = 4.0; double c = Math.sqrt(a * a + b * b);//sqrt()为Java的内置方法,求参数的平方根 System.out.println("斜边长度为 " + c); }
}
posted on 2008-04-11 14:34 dripstone 阅读(194) 评论(0) 编辑 收藏
Powered by: BlogJava Copyright © dripstone