Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim numeros(0 To 4) As Integer
Dim c1, c2, c3, acumulador As Integer
For c1 = 0 To 4
numeros(c1) = InputBox("Ingrese un numero entero")
Next
For c2 = 0 To 4
MsgBox("El numero ingresado fue " & numeros(c2))
Next
For c3 = 0 To 4
acum = acum + numeros(c3)
Next
MsgBox("La suma del vector es " & acum)
Label2.Text = acum
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form2.Show()
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
End Sub
End Class

No hay comentarios:
Publicar un comentario