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

in #programming7 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

Sort:  

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

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.029
BTC 60934.92
ETH 3379.12
USDT 1.00
SBD 2.48