All pastes #507418 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-05-24 15:20 UTC
rendered paste body
Write a program which displays
Please type 1 for first class
please type 2 for economy class

If the person types 1, then your program should assign a seat in the first class. If the person types 2 then your program should assign seats in the economy class. Your program should then print a boarding pass indicating the persons seat number and whether it is the first class or the economy class. The program should indicate if no more seats are available. And it should never assign a seat that has already been assigned