21 Write an VB program to check whether the given number is even or odd.
Hints: - Use If Else Statement
Answers
Answered by
1
Answer:
Module Module1
Sub Main()
Dim num As Integer = 0
Console.Write("Enter Your number: ")
num = Integer.Parse(Console.ReadLine())
If num Mod 2 = 0 Then
Console.WriteLine("Given number is EVEN")
Else
Console.WriteLine("Given number is ODD")
End If
End Sub
End Module
Similar questions