sexta-feira, 10 de outubro de 2014

Exercicio Maromo Matriz Vetor





Sub MatrizVetor()
Dim v(6, 6) As Integer
Dim l     As Integer
Dim c     As Integer
Dim x     As String
Dim y     As String

For l = 0 To 6
  For c = 0 To 6
        v(l, c) = 1
   
      If l < c Then
        v(l, c) = 2
      End If
   
      If l > c Then
        v(l, c) = 0
      End If
   Next
 Next
 
 For l = 0 To 6
    For c = 0 To 6
    x = x & v(l, c)
    Next
 y = y + x
 x = ""
 y = y & Chr(13)
 Next

Debug.Print y

End Sub

Nenhum comentário:

Postar um comentário