while(p==2)
{
printf("\nwelcome to theairline system!\n\nplease choose the serves below and press the number:\n\n");
printf("================================================================\n\n");
printf(" 1->订票\n");
printf(" 2-> 退票\n");
printf(" 3->查询\n");
printf(" 4->退出系统\n\n");
printf("================================================================\n");
switch(ch=getchar()){
case '1':{printf("\n*-------------Booking Ticket-------------*\n"); /*进入订票功能*/
printf("Please input a airline number and press enter for OK:");
scanf("%s",air_num);
printf("Please input your name and press enter for OK:");
scanf("%s",name);
printf("Please input your ID number and press enter for OK:");
scanf("%s",ID_num);
BookTicket(air,air_num,cus,name,ID_num);getchar();}
;break;
case '2':{printf(" *-----------------------Canceling Ticket--------------------*\n"); /*进入退票功能*/
printf("Please input the cancel name for booking ticket:");
scanf("%s",name);printf("Please input the ID for booking ticket:");scanf("%s",ID_num);
CancelTicket(cus,air,name,ID_num);
};break;
case '3':{printf("*---------------Search Information---------------------*\n"); /*进入信息查询功能*/ printf("1-> flight information \n" ); printf("2-> passenger information\n "); printf(" other -> exit\n"); printf("*------------------------------------------------------*\n"); if((ch=getchar())=='1') /*航班信息查询*/
{printf("*------------------ flight information -----------------*\n");
SearchFlight(air);}
else if(ch=='2'){/*乘客资料查询*/
printf("\n please input the key:");scanf("%s",mima);/*输入管理员密码*/
if(strcmp(mima,t)==0){printf("\n*---------------passenger information ---------------*\n\n");
SearchPassenger(cus);}
else printf("sorry,the key is wrong");getchar();}}break;