0% found this document useful (0 votes)
25 views

Programa 4 Visual

This document describes a Visual Studio 2010 program that calculates the average of values in an array. The program contains text boxes to input array values and a button click event that calculates the sum of the array and divides by the array length to display the average in a sixth text box. The program defines a class containing event handlers for the text boxes and button but does not include any implementation details.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Programa 4 Visual

This document describes a Visual Studio 2010 program that calculates the average of values in an array. The program contains text boxes to input array values and a button click event that calculates the sum of the array and divides by the array length to display the average in a sixth text box. The program defines a class containing event handlers for the text boxes and button but does not include any implementation details.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Programa 4

Programa en Visual Studio 2010 que imprime un vector con el promedio de los datos

Public Class Form1


Public Class Form1

Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles


MyBase.Load
End Sub

Private Sub Label1_Click(sender As System.Object, e As System.EventArgs) Handles


Label1.Click

End Sub

Private Sub Label2_Click(sender As System.Object, e As System.EventArgs) Handles


Label2.Click

End Sub

Private Sub Label3_Click(sender As System.Object, e As System.EventArgs) Handles


Label3.Click

End Sub

Private Sub Label4_Click(sender As System.Object, e As System.EventArgs) Handles


Label4.Click

End Sub

Private Sub Label5_Click(sender As System.Object, e As System.EventArgs) Handles


Label5.Click

End Sub

Private Sub Label6_Click(sender As System.Object, e As System.EventArgs) Handles


Label6.Click

End Sub

Private Sub Label7_Click(sender As System.Object, e As System.EventArgs) Handles


Label7.Click

End Sub

Private Sub TextBox1_TextChanged(sender As System.Object, e As System.EventArgs)


Handles TextBox1.TextChanged

End Sub

Private Sub TextBox2_TextChanged(sender As System.Object, e As System.EventArgs)


Handles TextBox2.TextChanged
End Sub

Private Sub TextBox3_TextChanged(sender As System.Object, e As System.EventArgs)


Handles TextBox3.TextChanged

End Sub

Private Sub TextBox4_TextChanged(sender As System.Object, e As System.EventArgs)


Handles TextBox4.TextChanged

End Sub

Private Sub TextBox5_TextChanged(sender As System.Object, e As System.EventArgs)


Handles TextBox5.TextChanged

End Sub

Private Sub TextBox6_TextChanged(sender As System.Object, e As System.EventArgs)


Handles TextBox6.TextChanged

End Sub

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles


Button1.Click
Dim vec = {TextBox1, TextBox2, TextBox3, TextBox4, TextBox5}
Dim vector(5), j, acum As Integer
For j = 0 To 4
vector(j) = vec(j).Text
Next
For j = 0 To 4
acum = acum + vector(j)

Next
TextBox6.Text = acum / 5
End Sub
End Class

You might also like