Java,这个年份的代码,1900不是闰年,2016是闰年,有点专牛角尖了,哪位大神指点一下啊???
package cap1; import java.util.Scanner; public class HelloWorld { public static void main(String[] args) { Scanner input=new Scanner(System.in); System.out.println("请输入:"); int num=input.nextInt(); int age1=num%4; int age2=num%100; int age3=num%400; if(age3==0) { System.out.println("该年是闰年"); }else if(age2==0||age1!=0) { System.out.println("该年是闰年"); }else { System.out.println("该年不是闰年"); } } }