Pages

Search This Blog

Find Maximum between 2 numbers


Module maximum
    Sub main()
        Dim a, b As Integer
        Console.Write("Enter the values of a and b :")
        a = CInt(Console.ReadLine())
        b = CInt(Console.ReadLine())
        If a > b Then
            Console.WriteLine("Maximum=" + a.ToString())
        Else
            Console.WriteLine("Maximum=" + b.ToString())
        End If
        Console.ReadLine()
    End Sub
End Module

4 comments: