您的位置:首页 > 其它

三个数大小的比较

2012-05-29 20:55 106 查看
在窗体上插入三个文本框,一个按钮,输入代码:

Private SubCommand1_Click()

  Dim a As Integer

  Dim b As Integer

  Dim c As Integer

 

  a = Text1.Text

  b = Text2.Text

  c = Text3.Text

 

If a > bThen

   Max = a

Else

   Max = b

End If

If c > MaxThen

  Max = c

End If

  Print Max

End Sub

    这个程序比较简单,通过使用If函数可以较简单的得出所需的结果。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  integer c