求根号5的值--用java实现
摘要:
public class Math {public static void main(String[] args) {double a=0.0001;double result ;for (double i=2.0;i<=5.0;i+=a) {result=i*i;double b=5.0-a;if ((result>=b)&&result<=5+2*a){System.out.println(i);}}}} 阅读全文
posted @ 2011-11-30 21:06 ggbond1988 阅读(1210) 评论(0) 推荐(0) 编辑