' Fig. 3.19: Comparison.vb
' Using equality and relational operators.

Module modComparison

    Sub Main()

        ' declare Integer variables for user input
        Dim number1, number2 As Integer

        ' read first number from user
        Console.Write("Please enter first integer: ")
        number1 = Console.ReadLine()

        ' read second number from user
        Console.Write("Please enter second integer: ")
        number2 = Console.ReadLine()

        If (number1 = number2) Then
            Console.WriteLine("{0} = {1}", number1, number2)
        End If

        If (number1 <> number2) Then
            Console.WriteLine("{0} <> {1}", number1, number2)
        End If

        If (number1 < number2) Then
            Console.WriteLine("{0} < {1}", number1, number2)
        End If

        If (number1 > number2) Then
            Console.WriteLine("{0} > {1}", number1, number2)
        End If

        If (number1 <= number2) Then
            Console.WriteLine("{0} <= {1}", number1, number2)
        End If

        If (number1 >= number2) Then
            Console.WriteLine("{0} >= {1}", number1, number2)
        End If

    End Sub ' Main

End Module ' modComparison

