在这里插入代码片
```
import java.util.Scanner;
public class Runnian{
public static void main (String[] args){
Scanner sc = new Scanner(System.in);
int x;
System.out.println("输入x ");
x = sc.nextInt();
if(x % 4 == 0 && x % 100 != 0 || x % 400 == 0){
System.out.println ( x + "是闰年");
}
else{
System.out.println ( x + "不是闰年");
}
}
}
转载请注明原文地址:https://blackberry.8miu.com/read-41547.html