Public Class Form1
Dim acumulador As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim numeros(2, 2) As Integer
Dim c1, c2 As Integer
For c1 = 0 To 2
For c2 = 0 To 2
numeros(c2, c1) = InputBox("Ingrese un numero entero")
Next
Next
For c1 = 0 To 2
For c2 = 0 To 2
MsgBox("Valores ingresados " & numeros(c2, c1))
Next
Next
For c1 = 0 To 2
For c2 = 0 To 2
acumulador = acumulador + numeros(c2, c1)
Next
Next
MsgBox("La suma de todos los números es " & acumulador)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form2.Show()
End Sub

No hay comentarios:
Publicar un comentario