Estructuras De Datos Estáticas - Vectores (Visual Basic)steemCreated with Sketch.

in programming •  7 years ago 

Estructuras De Datos Estáticas - Vectores (Visual Basic)

visual basic.png

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

img.png

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

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Congratulations @mauricioeb83! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of posts published
You published 4 posts in one day

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

By upvoting this notification, you can help all Steemit users. Learn how here!

Thank you very much