用java编写一个程序如下: 资源ID: 判断某一年是不否是闰年。闰年的条件是符合下面二者之一:能被4整除,但不能被100整除;能被4整除,又能被400整除。 public class Du1 { public static void main(String[] args) { int year = 2011; if((year % 4 == 0 && year % 100 != 0) || (year % 4 == 0 && year % 100 == 0) ){ System.out.println("是闰散橡誉冲段年"); }else{ System.out.println("如芦It is "); } }} ← 上一篇: 下一篇: →