Está en la página 1de 2

Attribute VB_Name = "Módulo7"

Sub Balotas_colores()

Dim Vp As Integer

Dim Balota As String

Dim Vpt As String

'1=verde

'2=Roja

'3=Blanca

Vp = InputBox("Valor a pagar", "Descuento por balota")

Balota = InputBox("Ingrese número de su boleta", "Descuento por

balota")

If Balota = 1 Then

Vpt = Vp - 0.25 * Vp

Vpt = MsgBox("Deberá pagar" & Vpt, vbInformation, "Su descuento

por esta balota es del 25%")

ElseIf Balota = 2 Then

Vpt = Vp - 0.5 * Vp

Vpt = MsgBox("Deberá pagar" & Vpt, vbInformation, "Su

descuento por esta balota es del 50%")

ElseIf Balota = 3 Then

Vpt = Vp

Vpt = MsgBox("Deberá pagar" & Vpt, vbInformation, "Esta balota

no tiene descuento")

Else

End If
End Sub

También podría gustarte