1 public class year{
 2 
 3 
 4   public static void main(String[] args){
 5 
 6     int year=2010;
 7 
 8    if((year%4==0&&year%100!=0)||(year%400==0)){
 9 
10       System.out.println(year+"年是闰年");
11 }else{
12 
13    System.out.println(year+"年是平年");
14 }
15    
16 
17 }
18 
19 }

 

posted on 2017-07-11 18:38  动手不吵吵的程序员  阅读(772)  评论(0编辑  收藏  举报