You are on page 1of 2

PROMEDIO DE NOTAS DE UN ALUMNO QUE PRESENTA TRES NOTAS

Public Class Form1


Dim n1 As Integer
Dim n2 As Integer
Dim n3 As Integer
Dim P As Single
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
n1 = Val(TextBox1.Text)
n2 = Val(TextBox2.Text)
n3 = Val(TextBox3.Text)
P = (n1 + n2 + n3) / 3
TextBox4.Text = P
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
End Sub
End Class




















E1,E2,E3
P
INICIO
1 +2 +3
3
P=
FIN

You might also like