Estructuras De Datos Estáticas - Vectores (Visual Basic)
CONSIGNA
Crear un vector de 5 e ingresar números, informar:
Total
Promedio
Observaciones
Presentar los valores del vector en un listbox
Presentar total y promedio en textbox
INTERFAZ
CÓDIGO FUENTE
Private Sub EJECUTAR_Click()
acu = 0
For i = 0 To 5
n(i) = InputBox("Ingrese un numero: ", "Ejercicio 1")
acu = acu + n(i)
List1.AddItem n(i)
Next i
Text1.Text = acu
Text2.Text = acu / 5
End Sub
Private Sub Form_Load()
List1.Clear
Text1.Text = 0
Text2.Text = 0
End Sub
Private Sub SALIR_Click()
Unload Me
End Sub
Congratulations @mauricioeb83! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP
Thank you very much