有5个整型的变量a、b、c、d、e怎么把最大的取出来

解决方案 »

  1.   

    课本上应该有啊 思路先设个临时变量x,a和b比最大的赋值给x再和c比依次论推
      

  2.   


    dim lMax as long
    lmax=a
    if b>lmax then lmax=b
    if c>lmax then lmax=c
    if d>lmax then lmax=d
    if e>lmax then lmax=e
    print lmax
      

  3.   

    Private Sub Command1_Click()
        Dim aInt(4) As Integer
        Dim intTemp As Integer
        Dim intI    As Integer
        
        intTemp = 0
        aInt(0) = 0
        aInt(1) = 1
        aInt(2) = 2
        aInt(3) = 3
        
        For intI = 0 To UBound(aInt)
            If intTemp < aInt(intI) Then
                intTemp = aInt(intI)
            End If
        Next
        
        
        MsgBox "数组中最大值为" & intTemp
    End Sub
      

  4.   

    周章  icecanal() 
    这种问题确实还是让他自己写好
    免得养成依赖心理