Definir Notas

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 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