源码简介: |
数组、指针和引用的操作练习航空售票系统:为一个容量为10个座位飞机的航班之每次飞行分配座位。程序显示两个选项的菜单: please type 1 for ″smoking″ please type 2 for ″nonsmoking″如果购票人键入了1,那么程序就在吸烟区给他分配一个座位(座号1);如果键入了2,程序就在无烟区给他分配一个座位(座号6)。然后程序打印出该购票者所得的座号以及座位是在无烟区还是在吸烟区。-Array, pointer and invoke the operation of the aviation practice ticketing system: as a seating capacity of 10 flights of aircraft allocation of seats per flight. Program displays a menu of two options: please type 1 for smoking please type 2 for nonsmoking If the tickets were type 1, then the procedures in the smoking area to give him the allocation of a seat (seat 1-5) If you type 2, the procedure to him in a smoke-free zone assigned a seat (seat 6-10). And then print out the booking procedures from the seat, as well as those seats are in a smoke-free area or in the smoking area.
|