Parcial 3

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Universidad Tecnológica De Panamá

Centro Regional de Veraguas


Facultad De Ingeniería civil
Asignatura: Programación
Parcial # 3
Profesor:
Milka de Escobar
Estudiantes:
José Hernández
I Semestre 2019
Public Class Form1
Private Sub cmdcalcular_Click(sender As Object, e As EventArgs) Handles
cmdcalcular.Click
Dim vec(10), vec2(8), x, i, suma, multiplicacion As Integer
x = txtvector.Text
ReDim vec(x)
For i = 1 To x
vec(i) = InputBox("introduce el valor" & i)
ListBox1.Items.Add(vec(i))
suma = vec(i) + vec2(i)
multiplicacion = vec(i) * vec2(i)

Next
For i = 1 To x
vec2(i) = InputBox("introduce el valor" & i)
ListBox2.Items.Add(vec2(i))
suma = vec(i) + vec2(i)
multiplicacion = vec(i) * vec2(i)

Next
For i = 1 To x
ListBox3.Items.Add(vec(i) + vec2(i))
Next

For i = 1 To x

ListBox4.Items.Add(vec(i) * vec2(i))
Next

End Sub

Private Sub cmdlimpiar_Click(sender As Object, e As EventArgs) Handles


cmdlimpiar.Click
ListBox1.Items.Clear()
ListBox2.Items.Clear()
ListBox3.Items.Clear()
ListBox4.Items.Clear()
txtvector.Clear()
End Sub
Private Sub cmdsalir_Click(sender As Object, e As EventArgs) Handles
cmdsalir.Click
End
End Sub

Private Sub txtvector_TextChanged(sender As Object, e As EventArgs) Handles


txtvector.TextChanged
If Not IsNumeric(txtvector.Text) Then
MsgBox("valor errado")
End If
End Sub
End Class

You might also like