摘要: package javaweb1200;import java.math.BigDecimal;public class xunhuan035 {public static void main(String[] args) {BigDecimal sum=new BigDecimal(1.0);// BigDecimal factorial=new BigDecimal(1.0);int i=1; while(i<=20){ sum=sum.add(factorial); i++; factorial=factorial.multiply(new BigDecimal(1.0/i)); 阅读全文
posted @ 2014-04-02 15:05 kin2321 阅读(726) 评论(0) 推荐(0) 编辑