Preduce VB code that examines the values in three textbooks
Preduce VB code that examines the values in three textbooks (txtval1, txtval2, and txtval3) and identifies the least at the three values. Report the result in a message box.
(Visual Basic)
Preduce VB code that examines the values in three textbooks (txtval1, txtval2, and txtval3) and identifies the least at the three values. Report the result in a message box.
(Visual Basic)
(Visual Basic)
Solution
Dim a, b, c As Integer
a = Val(txtval1.Text)
b = Val(txtval2.Text)
c = Val(txtval3.Text)
If a > b Then
If a > c Then
MsgBox(\"A is Greater\")
Else
MsgBox(\"C is greater\")
End If
Else
If b > c Then
MsgBox(\"B is Greater\")
Else
MsgBox(\"C is Greater\")
End If
End If
