VB Program - To find out whether the given year is a leap year or not?
Program :
Sub LeapYear()
Dim varYear
varYear = InputBox("Enter the Year")
If varYear Mod 4 = 0 Then
MsgBox varYear + " is a Leap year"
Else
MsgBox varYear + " is not a Leap year"
End If
End Sub
Program :
Sub LeapYear()
Dim varYear
varYear = InputBox("Enter the Year")
If varYear Mod 4 = 0 Then
MsgBox varYear + " is a Leap year"
Else
MsgBox varYear + " is not a Leap year"
End If
End Sub
No comments:
Post a Comment