Programa en visual para calcular un promedio, y decir si la persona es SR. SRA.
SRITA. O Joven
Public Class Form1
Private Sub Button1_Click(ByVal sender As [Link], ByVal e As
[Link]) Handles [Link]
Dim vec = {TextBox6, TextBox7, TextBox8}
Dim vector(3), j, acum As Integer
For j = 0 To 2
vector(j) = vec(j).Text
Next
For j = 0 To 2
acum = acum + vector(j)
Next
[Link] = acum / 3
[Link] = acum / 3
If ([Link] < 18) And ([Link] = "masculino") Then
[Link] = True
End If
If ([Link] > 18) And ([Link] = "masculino") Then
[Link] = True
End If
If ([Link] < 18) And ([Link] = "femenino") Then
[Link] = True
End If
If ([Link] > 18) And ([Link] = "femenino") Then
[Link] = True
End If
If ([Link] > 7) Then
[Link] = True
End If
If ([Link] < 6) Then
[Link] = True
End If
End Sub
Private Sub Label10_Click(ByVal sender As [Link], ByVal e As
[Link]) Handles [Link]
End Sub
Private Sub Label9_Click(ByVal sender As [Link], ByVal e As
[Link]) Handles [Link]
End Sub
Private Sub Label8_Click(ByVal sender As [Link], ByVal e As
[Link]) Handles [Link]
End Sub
Private Sub Label7_Click(ByVal sender As [Link], ByVal e As
[Link]) Handles [Link]
End Sub
Private Sub Label6_Click(ByVal sender As [Link], ByVal e As
[Link]) Handles [Link]
End Sub
Private Sub Label4_Click(ByVal sender As [Link], ByVal e As
[Link]) Handles [Link]
End Sub
Private Sub Label5_Click(ByVal sender As [Link], ByVal e As
[Link]) Handles [Link]
End Sub
Private Sub Label3_Click(ByVal sender As [Link], ByVal e As
[Link]) Handles [Link]
End Sub
Private Sub Form1_Load(ByVal sender As [Link], ByVal e As
[Link]) Handles [Link]
[Link] = False
[Link] = False
[Link] = False
[Link] = False
[Link] = False
[Link] = False
End Sub
Private Sub Label17_Click(ByVal sender As [Link], ByVal e As
[Link]) Handles [Link]
End Sub
End Class