美文网首页
2020-04-21

2020-04-21

作者: Infinite_lfp | 来源:发表于2020-04-21 11:19 被阅读0次
    1    public class LeapYear {
    2        public static void main(String args[]) 
    3        {
    4                int year = 2016; 
    5                if ((year % 4 == 0 && year % 100 != 0) || 
    6                      (year % 400 == 0)){
    7                      System.out.println(year + " is a leap year.");
    8                }
    9                 else{
    10                    System.out.println(year + " is not a leap year.");
    11                }
    12               }
    13    }
    

    相关文章

      网友评论

          本文标题:2020-04-21

          本文链接:https://www.haomeiwen.com/subject/smxuihtx.html