第三周作业
1 package text; 2 import java.util.Scanner; 3 4 public class note1 { 5 public static void main(String[] args) { 6 Scanner input = new Scanner(System.in); 7 System.out.println("输入一个年份"); 8 int year = input.nextInt(); 9 if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) { 10 System.out.println(year + "是闰年"); 11 } else { 12 System.out.println(year + "不是闰年"); 13 } 14 15 } 16 17 }