HW5.16

HW5.16

 public class Solution
 {
     public static void main(String[] args)
     {
         for(int i = 2000; i <= 2010; i++)
             System.out.printf("%d\t%d\n", i, numberOfDaysInAYear(i));
     }

     public static int numberOfDaysInAYear(int year)
     {
         if((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
             return 366;
         else
             return 365;
     }
 }
上一篇:顺序查找SequentialSearch


下一篇:关于标准的知识 GB ISO 等内容