Prompt Detail:
Here is the program in Visual Basic 6:
vbnetPrivate Sub Command1_Click()
Dim num1 As Integer
Dim num2 As Integer
Dim num3 As Integer
Dim max As Integer
num1 = Val(Text1.Text)
num2 = Val(Text2.Text)
num3 = Val(Text3.Text)
max = num1
If (num2 > max) Then
max = num2
End If
If (num3 > max) Then
max = num3
End If
Label1.Caption = max
End Sub
This program takes three numbers as input from the text boxes Text1
, Text2
, and Text3
, and displays the maximum of the three numbers in the Label1
control. The program is executed when the Command1
button is clicked.
Add a comment