Sub TestLeMax()
Dim tTab(10) As Integer
Dim i As Integer
Call JeudEssai(tTab)
For i = 1 To 10
Debug.Print tTab(i) & " " & i
Next
Debug.Print "L'indice max est : " & IndiceLeMax(tTab)
Debug.Print "valeur max : " & LeMax(tTab)
Debug.Print "L'indice min est : " & IndiceLeMin(tTab)
Debug.Print "valeur min : " & LeMin(tTab)
End Sub
Function LeMax(tTab() As Integer)
Dim i As Integer
Dim vMax As Integer
vMax = tTab(1)
For i = 2 To 10
If vMax < tTab(i) Then
vMax = tTab(i)
End If
Next
LeMax = vMax
End Function
C'est de l'algorithme. c'est ça qu'il y a derriére les sites internet, les logiciels informatique et tout et tout..