Foxtable(狐表)用户栏目专家坐堂 → 如何将A、B两列中的最大值填入C列?


  共有4050人关注过本帖树形打印复制链接

主题:如何将A、B两列中的最大值填入C列?

帅哥哟,离线,有人找我吗?
lsy
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:5246 积分:33163 威望:0 精华:8 注册:2013/1/17 21:28:00
  发帖心情 Post By:2014/3/27 20:11:00 [显示全部帖子]

'查找最大值:
Dim Int() As Integer = {8,45,6,2,67}
Dim lst As New List(Of Integer)
lst.Add(Int(0))
For i As Integer = 1 To Int.Length - 1
    If Int(i) > lst(0) Then
        lst(0) = Int(i)
    End If
Next
Output.Show(lst(0))

'查找最小值:
Dim Int() As Integer = {8,45,6,2,67}
Dim lst As New List(Of Integer)
lst.Add(Int(0))
For i As Integer = 1 To Int.Length - 1
    If  Int(i) < lst(0) Then
        lst(0) = Int(i)
    End If
Next
Output.Show(lst(0))


 回到顶部