多个变量 取最大的变量

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

设 abcde 为五个数字变量

Dim a() As Integer = {a, b, c, d, e, 0, 0, 0, 0}
                    For index As Integer = 0 To 4
                        If a(index) >= (a(0) + a(1) + a(2) + a(3) + a(4)) / 5 Then
                            a(5) = a(index) + a(5)
                            a(6) = a(6) + 1
                        End If
                    Next
                    For index As Integer = 0 To a(6)
                        If a(index) >= a(5) / a(6) Then
                            a(7) = a(index) + a(7)
                            a(8) = a(8) + 1
                        End If
                    Next
                    For index As Integer = 0 To a(8)
                        If a(index) >= a(7) / a(8) Then
                            Select Case index
                                Case 0
                                    msgbox("最大变量是a")
                                Case 1
                                    msgbox("最大变量是b")
                                Case 2
                                    msgbox("最大变量是c")
                                Case 3
                                    msgbox("最大变量是d")
                                Case 4
                                    msgbox("最大变量是e")
                            End Select
                        End If
                    Next