dim flightlength as decimal
dim flighttotal as decimal
dim planetypes() as string = {"invalid data", "2 seater", "Historic"}
dim flightprices() = {1, 100, 150, 120, 300, 500}
dim flightlengths(3)as decimal
console.writeline("input query: type of plane (type '1' to choose 2 seater, '2' for 4 seater or '3' for Historic)")
planetype = console.readline()
do while planetype <> 1 and planetype <> 3 and planetype <> 5
console.writeline("input error")
planetype = console.ReadLine()
flighttotal = math.round(600 / (flightlength + 30))
dim thirtyslots() as string = {"invalid data", "08:00am", "09:00am", "10:00am", "11:00am", "12:00pm", "01:00pm", "02:00pm", "03:00pm", "04:00pm", "05:00pm"}
dim sixtyslots()as string = {"invalid data", "08:00am", "09:30am", "11:00am", "12:30pm", "02:00pm","03:30pm", "05:00pm"}
if flightlength = 60 then
planetype = planetype + 1
console.WriteLine("maximum number of flights today is " & flighttotal)
console.writeline("maximum income earned today is $" & Flightprices(planetype)* Flighttotal)
console.writeline("will the " & planetypes(i) & " be flying for 30/60 min periods?")
flightlengths(i) = console.readline()
do while flightlengths(i) <> "30" and flightlengths(i) <> "60"
console.WriteLine("input error, rety using 30 or 60")
flightlengths(i) = console.ReadLine()
dim flightslots(3) as decimal
console.writeline("There are several slots available throughout the day between 8am and 6pm for the three planes")
if flightlengths(i) = 30 then
for j = 1 to flightslots(i)
console.WriteLine(planetypes(i) & ", slot " & j & ": " & thirtyslots(j))