dim bookings(19) as integer
dim bookings30(9) as integer
dim bookings60(6) as integer
dim bookingnumber as integer
dim startingnumber as integer
dim bookingtypetime as integer
dim bookingtypeplane as integer
dim todayincome as integer
console.writeline("Enter Seater 2's flight duration(30 or 60)")
flights2 = console.readline()
loop until flights2 = 30 or 60
console.writeline("Maximum profit from the 2 seater flight is $1000")
elseif flights2 = 60 then
console.writeline("Maximum profit from the 2 seater flight is $1050")
console.writeline("Enter Seater 4's flight duration(30 or 60)")
flights4 = console.readline()
loop until flights4 = 30 or 60
console.writeline("Maximum profit from the 4 seater flight is $1200")
elseif flights4 = 60 then
console.writeline("Maximum profit from the 4 seater flight is $1400")
console.writeline("Enter Historics flight duration(30 or 60)")
Historic = console.readline()
loop until Historic = 30 or 60
console.writeline("Maximum profit from the Historic flight is $3000")
elseif Historic = 60 then
console.writeline("Maximum profit from the Historic flight is $3500")
console.writeline("Bookings go up to numbers 0 to 6 for 30 minutes")
console.writeline("Bookings go up to numbers 0 to 9 for 60 mintues")
console.writeline("How many booking is there today?")
bookingnumber = console.readline()
loop until bookingnumber >= 1 and bookingnumber <= 10
console.writeline("Is your booking for 30(1) or 60(2) mintue flights")
bookingtypetime = console.readline()
if bookingtypetime = 1 then
if flights2 = 30 and flights4 = 30 and historic = 30 then
console.writeline("Is your booking for a 2 seater(1), 4 seater(2) or historic(3)")
bookingtypeplane = console.readline()
else if flights2 = 30 and flights4 = 30 then
console.writeline("Is your booking for a 2 seater(1) or 4 seater(2)")
bookingtypeplane = console.readline()
else if flights2 = 30 and historic = 30 then
console.writeline("Is your booking for a 2 seater(1) or historic(3)")
bookingtypeplane = console.readline()
else if flights4 = 30 and historic = 30 then
console.writeline("Is your booking for a 4 seater(2) or historic(3)")
bookingtypeplane = console.readline()
else if flights2 = 30 then
console.writeline("Is your booking for a 2 seater(1)")
bookingtypeplane = console.readline()
else if flights4 = 30 then
console.writeline("Is your booking for a 4 seater(2)")
bookingtypeplane = console.readline()
else if historic = 30 then
console.writeline("Is your booking for a historic(3)")
bookingtypeplane = console.readline()
else if bookingtypetime = 2 then
if flights2 = 60 and flights4 = 60 and historic = 60 then
console.writeline("Is your booking for a 2 seater(4), 4 seater(5) or historic(6)")
bookingtypeplane = console.readline()
else if flights2 = 60 and flights4 = 60 then
console.writeline("Is your booking for a 2 seater(4) or 4 seater(5)")
bookingtypeplane = console.readline()
else if flights2 = 60 and historic = 60 then
console.writeline("Is your booking for a 2 seater(4) or historic(6)")
bookingtypeplane = console.readline()
else if flights4 = 60 and historic = 60 then
console.writeline("Is your booking for a 4 seater(5) or historic(6)")
bookingtypeplane = console.readline()
else if flights2 = 60 then
console.writeline("Is your booking for a 2 seater(4)")
bookingtypeplane = console.readline()
else if flights4 = 60 then
console.writeline("Is your booking for a 4 seater(5)")
bookingtypeplane = console.readline()
else if historic = 60 then
console.writeline("Is your booking for a historic(6)")
bookingtypeplane = console.readline()
console.writeline("Input your booking time from 1 to 20(each number represents 30 min)")
bookingnumber = console.readline() - 1
if bookings(bookingnumber) = 0 then
bookings(bookingnumber) = bookingtypeplane
else if bookings(bookingnumber) > 0 then
console.writeline("This booking is full please try again or enter -1 to end and cancel")
else if bookingnumber = -1 then
loop until avaliable = true
if bookingtypeplane = 1 then
todayincome = todayincome + 100
startingnumber = startingnumber + 1
else if bookingtypeplane = 2 then
todayincome = todayincome + 120
startingnumber = startingnumber + 1
else if bookingtypeplane = 3 then
todayincome = todayincome + 300
startingnumber = startingnumber + 1
else if bookingtypeplane = 4 then
todayincome = todayincome + 150
startingnumber = startingnumber + 1
else if bookingtypeplane = 5 then
todayincome = todayincome + 200
startingnumber = startingnumber + 1
else if bookingtypeplane = 6 then
todayincome = todayincome + 500
startingnumber = startingnumber + 1
if bookingtypeplane = 1 or 2 or 3 then
console.writeline("Not enough time for your flight")
startingnumber = startingnumber + 1
else if bookingtypeplane = 4 or 5 or 6 then
console.writeline("Not enough time for your flight")
startingnumber = startingnumber + 1
console.writeline("Today's income currently is " + todayincome)
console.writeline("There are currently " + startingnumber + " flight(s) today")
console.writeline("There is " + time + " of flight time avaliable left")
loop until startingnumber = bookingnumber