PROBLEMA 1 - Ramón
Enviado por • 24 de Mayo de 2014 • 2.270 Palabras (10 Páginas) • 162 Visitas
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim a As Integer
Dim b As String
Dim c As Byte
a = InputBox("Ingresar el modelo del auto")
b = InputBox("Ingrese la marca del auto")
c = InputBox("Edad del conductor")
If a = 2013 Then
If b = "a" Then
If c > 17 And c < 26 Then
MsgBox(250 + 200)
ElseIf c > 25 And c < 36 Then
MsgBox(250 + 100)
ElseIf c > 35 And c < 50 Then
MsgBox(250 + 200)
End If
ElseIf b = "b" Then
If c > 17 And c < 26 Then
MsgBox(350 + 200)
ElseIf c > 25 And c < 36 Then
MsgBox(350 + 100)
ElseIf c > 35 And c < 50 Then
MsgBox(350 + 50)
End If
ElseIf b = "c" Then
If c > 17 And c < 26 Then
MsgBox(550 + 200)
ElseIf c > 25 And c < 36 Then
MsgBox(550 + 100)
ElseIf c > 35 And c < 50 Then
MsgBox(550 + 50)
End If
End If
ElseIf a = 2014 Then
If b = "a" Then
If c > 17 And c < 26 Then
MsgBox(300 + 200)
ElseIf c > 25 And c < 36 Then
MsgBox(300 + 100)
ElseIf c > 35 And c < 50 Then
MsgBox(300 + 200)
End If
ElseIf b = "b" Then
If c > 17 And c < 26 Then
MsgBox(420 + 200)
ElseIf c > 25 And c < 36 Then
MsgBox(420 + 100)
ElseIf c > 35 And c < 51 Then
MsgBox(420 + 50)
End If
End If
End If
End Sub
PROBLEMA 1 - JuanK
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim modelo As String
Dim marca As String
Dim edad As Integer
Dim AcuotaA As Integer
Dim AcuotaB As Integer
Dim AcuotaC As Integer
Dim BcuotaA As Integer
Dim BcuotaB As Integer
modelo = InputBox("ingrese el año de modelo de su auto: 2013 o 2014")
marca = InputBox("ingrese la marca de su auto: A,B o C")
edad = InputBox("ingrese la edad del conductor")
If edad > 17 And edad < 26 Then
AcuotaA = 250 + 200
AcuotaB = 350 + 200
AcuotaC = 550 + 200
BcuotaA = 300 + 200
BcuotaB = 420 + 200
ElseIf edad > 25 And edad < 36 Then
AcuotaA = 250 + 100
AcuotaB = 350 + 100
AcuotaC = 550 + 100
...