Ejercicios de programación .net (nivel inicial)
Se muestra el funcionamiento de los conceptos básicos para programar en .net
Se muestra el funcionamiento de los conceptos básicos para programar en .net
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Public Class Form5<br />
Private Sub Button1_Click(ByVal sen<strong>de</strong>r As System.Object, ByVal e As<br />
System.EventArgs) Handles Button1.Click<br />
Dim N1, N2, P As Double<br />
N1 = Val(TextBox1.Text)<br />
N2 = Val(TextBox2.Text)<br />
P = (N1 + N2) / 2<br />
TextBox3.Text = P<br />
If P >= 19 Then<br />
TextBox4.Text = "A"<br />
ElseIf P >= 16 Then<br />
TextBox4.Text = "B"<br />
ElseIf P >= 14 Then<br />
TextBox4.Text = "C"<br />
ElseIf P >= 12 Then<br />
TextBox4.Text = "D"<br />
Else<br />
TextBox4.Text = "E"<br />
End If<br />
End Sub<br />
Private Sub Button2_Click(ByVal sen<strong>de</strong>r As System.Object, ByVal e As<br />
System.EventArgs) Handles Button2.Click<br />
Form6.Show()<br />
Me.Hi<strong>de</strong>()<br />
End Sub<br />
Private Sub Button3_Click(ByVal sen<strong>de</strong>r As System.Object, ByVal e As<br />
System.EventArgs) Handles Button3.Click<br />
End<br />
End Sub<br />
End Class<br />
Leonel Navarrete