'思想:判断这年是不是用2月29日,如果有则是闰年,否则不是闰年!
Dim Years 'As String
Years=inputbox("请输入您想要查询的年份:","查询年份",Year(Date))'得到的年份信息
If Years=False Then WScript.Quit
If IsDate(Years & "/2/29") Then
MsgBox chr(34)&Years&chr(34)&"年—该年是闰年"
Else
MsgBox chr(34)&Years&chr(34)&"年—该年不是闰年"
End If |
|