Está en la página 1de 1

precioMilla = 1.

50
comienzo:
TextWindow.WriteLine("Ingrese distancia: ")
distancia = TextWindow.ReadNumber()
TextWindow.WriteLine("Ingrese millas: ")
milla = TextWindow.ReadNumber()
TextWindow.WriteLine("Ingrese cantidad de dias: ")
estadia = TextWindow.ReadNumber()
TextWindow.WriteLine("Ingrese S si es ida y vuelta de lo contrario ingrese N:
")
condicion = TextWindow.Read()

if(condicion = "S")then
vuelo = distancia * 2
else
vuelo = distancia
EndIf
vuelo = vuelo * 0.621371
total = vuelo * precioMilla
if(distancia > 1500 and estadia > 7 )then
total = total * 0.85
TextWindow.WriteLine("MOSTRAR " + total)
else
if(distancia < 1500)then
TextWindow.WriteLine("La distancia no es mayor a 1500km")
else
TextWindow.WriteLine("La estadia no es mayor a 7 dias")
EndIf
EndIf
if(milla > 500)then
total = total * 0.7
EndIf
TextWindow.WriteLine("El precio del pasaje es de: " + total)
GoTo comienzo

También podría gustarte