当前位置:首页 > 航空订票系统
{
printf(\对不起,票已售完!\\n\ IsRepl=0; } else { printf(\对不起,当前没有多余的票!\\n\ IsRepl=0; }
if(!IsRepl) { printf(\您是否想成为候补乘客(Y/N)?\ scanf(\ if(temp=='y'||temp=='Y') { if(p1->ReplName==NULL) { c2=(Customer*)malloc(sizeof(Customer)); Replp1[flight_no]=c2; p1->ReplName=Replp1[flight_no]; } else { c2=(Customer*)malloc(sizeof(Customer)); Replp1[flight_no]->Next=c2; Replp1[flight_no]=c2; } IsReplace=0; tag=1; Replp1[flight_no]->Amount=Ticket_Count; printf(\请输入您的姓名:\ scanf(\ Replp1[flight_no]->IDinfor=IDinfor; Replp1[flight_no]->Amount=Ticket_Count; printf(\请输入您的ID信息:\ scanf(\ printf(\没有剩余座位!\\n\ shouldsave=1; } } } else printf(\对不起,航班不存在!\\n\if(flag)
}
}
Custp1[flight_no]->Next=NULL; if(tag) { Replp1[flight_no]->Next=NULL;
printf(\您已将成功排入候补订票队列中!\\n\}
printf(\是否退出菜单?:(Y/N)\scanf(\if(c=='y'||c=='Y') return;
//10.订票乘客信息
void Display_Reserve() { Flight *p1; Customer *c1; system(\ p1=Head; if(Empty_Flight()) return; printf(\订票乘客信息\\n\ if(IsEmpty) { printf(\对不起,没有订票乘客信息!\\n\ getch(); return; } printf(\ printf(\姓名 证件号 订票数 航班号\\n\ while(p1!=NULL) { if(p1->CustName!=NULL) { c1=p1->CustName; while(c1!=NULL) { printf(\
}
if(p1->Free_Amount>=1)
printf(\还有多余的票!\\n\ else printf(\票已售完!\\n\ c1=c1->Next; } } p1=p1->Next;
printf(\ }
printf(\按任意键返回!\getch(); return;
//11.候补乘客信息 void Display_Replace() { Flight *p1; Customer *c1; system(\ p1=Head; if (Empty_Flight()) return;
printf(\候补乘客信息!\if(IsReplace) { printf(\对不起,没有候补乘客!\ getch(); return; }
printf(\printf(\姓名 证件号 订票数 航班号\\n\while(p1!=NULL) { if(p1->ReplName!=NULL) { c1=p1->ReplName; while(c1!=NULL) {
printf(\ if(p1->Free_Amount>=1)
}
printf(\还有多余的票!\\n\ else printf(\票已售完!\\n\ c1=c1->Next; } } p1=p1->Next; }
printf(\printf(\按任意键返回!\getch(); return;
//12.退票办理函数
void RefundticketMenu() { int Flight_No=0,flag=0; Flight *p1; Customer *c2,*c4; Customer *c3,*c5; char answer[7],name[7]; int tag=0; int IDinfor; if(Empty_Flight()) return; printf(\现在开始进行退票手续\ if(IsEmpty) { printf(\对不起,乘客不存在!\ getch(); return; } while(1) { flag=0;tag=0;Flight_No=0; printf(\请输入航班:\ scanf(\ if(Find_Line2(Head,answer,&p1,&Flight_No)) { c2=p1->CustName; printf(\请输入您的姓名:\ scanf(\ if(c2==NULL)
共分享92篇相关文档