import java.util.*; public class Demo { public static void main(String[] args){ int days = 0; Scanner sc = new Scanner(System.in); System.out.print("输入年份: "); int year = sc.nextInt(); System.out.print("输入月份: "); int month = sc.nextInt(
通过输入月份,判断是否是闰年 [代码区域] Sub 判断闰年() Dim year As Integer '用于保存输入的年份 year = CInt(InputBox("请输入需要判断的年份:", "判断闰年")) '输入年份 = <> Then MsgBox "" & "是一个闰年", vbOKOnly, "判断闰年" Else = = Then MsgBox ""