單篇狀態更新
-
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim INPUT_YEAR As Integer
INPUT_YEAR = Val(InputBox("今夕是何年?", "閏年判斷程式"))
If (INPUT_YEAR Mod 100) <> 0 Then
If (INPUT_YEAR Mod 4) = 0 Then
MsgBox("閏年")
Else
MsgBox("不為閏年")
End If
Else
If (INPUT_YEAR Mod 400) = 0 Then
MsgBox("閏年")
Else
MsgBox("不為閏年")
End If
End If
End Sub
End Class