Sub SubOrdenChoquito()
Dim v(4) As Integer
Dim i As Integer
Dim j As Integer
Dim troca As Integer
For i = 0 To 4
v(i) = CInt(InputBox("Digite um Valor: "))
Next
For i = 0 To 4
For j = 0 To 4
If v(i) > v(j) Then
troca = v(i)
v(i) = v(j)
v(j) = troca
End If
Next
Next
For i = 0 To 4
Debug.Print v(i)
Next
End Sub
Nenhum comentário:
Postar um comentário