I have been trying this over and over and over again. I am trying to write code to "find the larger of two numbers". Could anyone help me on this? Here is what I have so far. Thanks to all in advance :-)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Find the larger of two numbers input by the user'.
Dim num1, num2, largerNum As Double
Dim txtFirstNum, txtSecondNum, txtResults
num1 = CDbl(txtFirstNum.Text)
num2 = CDbl(txtSecondNum.Text)
If num1 > num2 Then
largerNum = num1
Else
largerNum = num2
End If
txtResults.Text = "The larger number is " & largerNum
End Sub
End Class
