HW5.13

HW5.13

 public class Solution
 {
     public static void main(String[] args)
     {
         System.out.printf("%s\t%s\n", "i", "m(i)");

         for(int i = 1; i <= 20; i++)
             System.out.printf("%d\t%f\n", i, getMi(1.0 * i));
     }

     public static double getMi(double number)
     {
         double sum = 0;
         for(int i = 1; i <= number; i++)
             sum += (i * 1.0) / ((i + 1) * 1.0);
         return sum;
     }
 }
上一篇:oracle11G归档日志管理


下一篇:使用python实现人脸检测