,.
}
{ }
else if(a=='3')
check_all_passenger(PList); return; else
printf(\请输入订单号:\scanf(\
order_num_check(PList,order_num);
void modify_flight(flightnode *&h,passengerList *&PList) {
flightnode *p=h->next;
char flight_num[10],start_time[10],end_time[10]; char a;
printf(\航线信息修改*************\\n\printf(\printf(\ 增加航班-------1 *\\n\printf(\ 删除航班-------2 *\\n\printf(\ 修改航班时间---3 *\\n\printf(\printf(\请选择:\a=getch(); printf(\if(a=='1') {
printf(\请输入要修改的航班的航班号:\scanf(\
if(flight_num_check(p,flight_num)==1) add_flight(h); delete_flight(h,PList); else if(a=='2') else if(a=='3')
,.
}
}
{ }
printf(\请输入修改后的起飞时间:\scanf(\
printf(\请输入修改后的抵达时间:\scanf(\for(;p!=NULL;p=p->next)
if(strcmp(flight_num,p->flight_num)==0) { }
strcpy(p->start_time,start_time); strcpy(p->end_time,end_time);
printf(\航班%s时间修改成功!\\n\
else
return;
int book(flightnode *&h,passengerList *&PList) {
char name[20]; //姓名 char ID_num[20]; //证件号 char flight_num[10]; //航班号 char start_place[20];//起飞城市 char end_place[20]; //抵达城市 int ticket_num; //订票数量 int k;
flightnode *p=h->next; printf(\请输入信息:\\n\printf(\请输入起飞城市:\scanf(\printf(\请输入抵达城市:\scanf(\
if(place_check(h,start_place,end_place)==1)
,.
{
printf(\航班号:\scanf(\while(flight_num==NULL){ }
while(p!=NULL){
if(strcmp(p->flight_num,flight_num)==0) {
printf(\姓名:\scanf(\printf(\证件号码:\scanf(\printf(\订票数量:\scanf(\while(name==NULL){ }
while(ID_num==NULL){ }
while(ticket_num==0){ }
if(p->left>0&&p->left>=ticket_num) {
printf(\客户订票数量不能为空!\\n\printf(\订票数量:\scanf(\printf(\客户证件号码不能为空!\\n\printf(\证件号码:\scanf(\
printf(\客户姓名不能为空!\\n\printf(\姓名:\scanf(\
printf(\航班号不能为空!\\n\printf(\航班号:\scanf(\
,.
}
} else
p=p->next; } else { }
printf(\很遗憾,该航班已满!***\\n\
printf(\如选择其他航班请输入-----1\\n\\t\\t***不选则输入printf(\输入数字进行选择:\scanf(\if(k==1) { }
printf(\此航线上的其他航班有:\\n\if(find_same_flight(h,flight_num)==1) { }
printf(\请输入您选的航班:\scanf(\
insert_passengerList(h,PList,name,ID_num,flight_num, printf(\恭喜您,订票成功!\\n\return 1;
printf(\你应付金额¥%6.2f.\\n\getch();
printf(\恭喜您,订票成功!\\n\return 1;
insert_passengerList(h,PList,name,ID_num,flight_num,ticket_num);
ticket_num);
-----0***\\n\
ticket_num);
if(p==NULL)