91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 102KB
    文件類型: .rar
    金幣: 2
    下載: 1 次
    發布日期: 2021-05-10
  • 語言: C/C++
  • 標簽: 飛機訂票??

資源簡介

事實上事實上飛機訂票系統,c ++編寫,不錯的資源

資源截圖

代碼片段和文件信息

#include
#include

struct?banci
{int?day;
?int?excess;
?banci?*ne*be;
};



struct?waybill
{char?name[20];
?int?day;
?waybill?*ne*be;
};



void?createbancilist(banci?*&?head)
{banci?*s?*p;
?s=new?banci;
?cout<<“請輸入航班起飛的時間和剩余機票,時間和剩余機票用空格分開“<?cin>>s->day>>s->excess;
?while(s->day!=0)
?????{if(head==NULL)
{
?head=s;
?????s->ne=s->be=s;
?p=s;?
}??
?????????
????
?
?????s->ne=head;
?????s->be=p;
?????p->ne=s;
?head->be=s;
?p=s;
?

?????
?????????s=new?banci;
?cin>>s->day>>s->excess;
???} ?
?

????????delete?s;
????????return;
}



void?showbanci(banci?*&head1)
{cout<<“班次的信息是:“<?cout<<“時間“<<“?????“<<“剩余票數“<?banci?*p=head1;?
???do
{cout<day<<“號“<<“??????????“<excess<?????p=p->ne;
}while(p!=head1);
?}


void?createwaybilllist(waybill?*&?head1banci?*&head2)
{waybill?*p*s;

?banci?*a=head2;
?s=new?waybill;
?cout<<“請輸入購票者的信息,名字在前面,起飛日期在后面,如果沒有需要輸入的信息,請以“0?0”結束“<?cin>>s->name>>s->day;
?
?while?(s->day!=0)
?{? if(a->day==s->day)?{cout<<“訂票成功“<???????????????????????(a->excess)--;
???goto?a;}
?
?????a=a->ne;
?while((a->day!=s->day)&&(a!=head2))
????????a=a->ne;?
?????if(a==head2)?{cout<<“我們沒有那天的票,訂票失敗“<???????????????????goto?A;}
??(a->excess)--;
?????cout<<“訂票成功,請繼續訂票,如果不需要訂票,請以“0?0”結束“< ???
a: ?if(head1==NULL)
{
?head1=s;
?????s->ne=s->be=s;
?p=s;?
}??
?????????
????
?
?????s->ne=head1;
?????s->be=p;
?????p->ne=s;
?head1->be=s;
?p=s;
?

?????
??????s=new?waybill;
?cin>>s->name>>s->day;
???} ?
?

A:??????delete?s;
????????return;
}




?void?showwaybill(waybill?*&?head)
?{cout<<“購票者的信息是“<??cout<<“名字“<<“??????????“<<“飛機的起飛日期“<?waybill?*p=head;?
???do
{cout<name<<“??????????“<day<?????p=p->ne;
}while(p!=head);
?}


?
?
?void?tuipiao(waybill?*&?headchar?a[20])
{waybill?*p;
?p=head;
?if(strcmp(p->namea)==0)?
?{
?head=head->ne;
?p->be->ne=head;
?head->be=p->be;
?cout<<“退票成功“< ?delete?p;
?????goto?B;
?}
?
?????p=p->ne;
?while((strcmp(p->namea)!=0)&&(p!=head))
????????p=p->ne;?
?????if(p==head)?{cout<<“您沒有訂票,退票失敗“<???????????????????goto?B;}
?head=head->ne;
?p->be->ne=head;
?head->be=p->be;
?cout<<“退票成功“< ?delete?p;
B:???return;
}



void?main()
{banci?*head1=NULL;
?waybill?*head2=NULL;
?int?a;
?char?b[20];
B:?cout<<“**************************歡迎使用廣州到北京的航班軟件**************************\n請輸入:\n1?初始化本次航班本月起飛的日期,建立本航班的日程表\n2?購票\n3?退票\n4?查看航班日程表\n5?查看乘客名單\n6?返回\n7?退出“<?cin>>a;
?switch(a)
?{case?1?:?createbancilist(head1);goto?B;
??case?2?:?createwaybilllist(head2head1?);goto?B;
??case?3?:?cout<<“請輸入您要退票的人的名字“< ???????cin>>b;
???tuipiao(head2b);goto?B;
??case?4?:?showbanci(head1);goto?B;
??case?5?:?showwaybill(head2);goto?B;
??case?6?:?goto?B;
??default?:?cout<<“歡迎使用“<<

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件?????213037??2008-03-17?18:36??飛機班次程序\Cpp1.exe

?????文件???????3250??2008-03-17?18:35??飛機班次程序\Cpp1.cpp

?????文件????2624094??2008-03-18?10:50??飛機班次程序\1.bmp

?????文件????1980410??2008-03-18?10:53??飛機班次程序\2.bmp

?????文件????1758990??2008-03-18?10:55??飛機班次程序\3.bmp

?????目錄??????????0??2008-03-17?18:39??飛機班次程序

-----------?---------??----------?-----??----

??????????????6579781????????????????????6


評論

共有 條評論