您的位置:首页 > 编程语言 > VB

vb比较三个数的大小

2012-04-25 21:18 176 查看
代码如下:

Private Sub Command1_Click()
Dim a As Integer, b As Integer, c As Integer

Dim max As Integer
a = Val(Text1.Text)

b = Val(Text2.Text)

c = Val(Text3.Text)

If a > b Then

max = a

Else

max = b

End If

If c > max Then

max = c

Else

max = max

End If

Label4.Caption = max
End Sub
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  vb integer command c