Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Universidad Tecnológica De Panamá

Centro Regional de Veraguas

Facultad De Ingeniería civil

Asignatura: Programación

Taller # 2

Profesor:
Milka de Escobar

Estudiantes:
José Hernández
Javier Quintero

I Semestre 2019
Problema # 4

Private Sub CALCULAR_Click(sender As Object, e As EventArgs) Handles CALCULAR.Click


Dim A, B As Single
A = TextN1.Text
B = TextN2.Text

If (A = B) Then
TextIGUAL.Text = A + B
TextMAYOR.Text = ""
TextMENOR.Text = ""

ElseIf (A > B) Then


TextIGUAL.Text = ""
TextMAYOR.Text = B * B
TextMENOR.Text = A * A * A

ElseIf (A < B) Then


TextIGUAL.Text = ""
TextMAYOR.Text = B * B * B
TextMENOR.Text = A * A

End If

End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles


Button2.Click
End
End Sub

End Class
Problema 5.8

Private Sub emdcalcular_Click(sender As Object, e As EventArgs) Handles


cadNota.Click
Dim P1, P2, P3 As Single
Dim Prom, Final, Nota As Single
P1 = Val(TxtP1.Text)
P2 = Val(TxtP2.Text)
P3 = Val(TxtP3.Text)
Final = Val(TxtFinal.Text)
Prom = (P1 + P2 + P3) / 3
Nota = ((P1 + P2 + P3) / 3) * 0.6 + Final * 0.4
TxtNota.Text = Nota

If (Nota >= 91) Then


TxtCalif.Text = "A"
ElseIf (Nota >= 81) Then
TxtCalif.Text = "B"
ElseIf (Nota >= 71) Then
TxtCalif.Text = "C"
ElseIf (Nota >= 61) Then
TxtCalif.Text = "D"
Else
TxtCalif.Text = "F"

End If
End Sub

Private Sub Form1_DoubleClick(sender As Object, e As EventArgs) Handles


Me.DoubleClick
TxtP1.Clear()
TxtP2.Clear()
TxtP3.Clear()
TxtFinal.Clear()
TxtNota.Clear()
TxtCalif.Clear()
End Sub

End Class
Problema 9

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click


TextTOTAL.Text = Val(TextVALOR.Text * TextHORAS.Text)
If TextHORAS.Text > 8 Then
TextTOTAL.Text = Val(TextVALOR.Text * TextHORAS.Text + 5%)

End If

End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles


Button2.Click
End
End Sub
End Class

You might also like