Module leap_yr Sub main() Dim y As Integer Console.Write("Enter Year:") y = CInt(Console.ReadLine()) If y Mod 4 = 0 And y Mod 100 <> 0 Or y Mod 400 = 0 Then Console.WriteLine("the year " + y.ToString + " is a leap year") Else Console.WriteLine("the year " + y.ToString + " is a NOT leap year") End If Console.ReadLine() End Sub End Module
Visual Basic dot net VB.net programming microsoft .net framework object oriented language network enabled technology visual basic 2005 IDE integrated development environment console application microsoft cre common runtime environment
Leap Year Using Logical Operators
Subscribe to:
Post Comments (Atom)
Computer Graphics Code Examples to learn programming
ReplyDelete