0% found this document useful (0 votes)
3 views3 pages

Calculadora de Promedio y Edad en VB

The document describes a visual program that calculates an average grade and determines a person's title (Mr., Mrs., Miss, or Youth) based on their age and gender. It takes in test scores, calculates the average, and displays the average and determination of title based on logic checking the age and gender inputs against thresholds. Labels are toggled on and off to display the appropriate title.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

Calculadora de Promedio y Edad en VB

The document describes a visual program that calculates an average grade and determines a person's title (Mr., Mrs., Miss, or Youth) based on their age and gender. It takes in test scores, calculates the average, and displays the average and determination of title based on logic checking the age and gender inputs against thresholds. Labels are toggled on and off to display the appropriate title.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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

You might also like