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

Definir Notas

This document defines a class with variables and subroutines to calculate averages and identify above average numbers from user inputs. It contains variables to store a number count, sum, average, and array of numbers. Subroutines handle button clicks to get user inputs, calculate the average, identify and display above average numbers, and clear or exit the application.

Uploaded by

HamiltonMosquera
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Definir Notas

This document defines a class with variables and subroutines to calculate averages and identify above average numbers from user inputs. It contains variables to store a number count, sum, average, and array of numbers. Subroutines handle button clicks to get user inputs, calculate the average, identify and display above average numbers, and clear or exit the application.

Uploaded by

HamiltonMosquera
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Public Class Form1

Dim
Dim
Dim
Dim
Dim

N As Integer
Prom As Double
Suma As Integer
Numeros(0 To 10) As Integer
elem(10) As String

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


N = TextBox1.Text
For K = 1 To N
Numeros(K) = InputBox("Numero " & K)
Suma = Suma + Numeros(K)
ListBox1.Items.Add(Numeros(K))
Next
Prom = Suma / N
TextBox2.Text = Prom
For K = 1 To N
If Numeros(K) > Prom Then
TextBox3.Text = Numeros(K)
End If
Next
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
ListBox1.ClearSelected()
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
If MsgBox(" DESEA SALIR DE LA APLICACION", vbQuestion + vbYesNo, "pregunta")
= vbYes Then
End
End If

End Sub
End Class

You might also like