c语言飞机订票设计步骤,【语言|c语言飞机订票系统设计( 二 )|飞机|订票|系统|设计】_傻大方...

傻大方摘要:【语言|c语言飞机订票系统设计( 二 )|飞机|订票|系统|设计】11、fCs.COSEe. IDnumber);printf(nn);printf (please input the ticket of number you want: XnXn1*):printf (,frow:w);scanf(H%dMtrow) 。 12、;)elseC()Se seatrow=row;break;printf (,fcolum...

按关键词阅读:

语言

飞机

设计

系统

订票

11、fCs.COSEe. IDnumber);printf(nn);printf (please input the ticket of number you want: XnXn1*):printf (,frow:w);scanf(H%dMt&row);for(int a=0;)if(row18|row20|row18)printf(Input error,row cann* t more 20 and less 18!please input again or please return and choose Smoking!nH);printf(Mrow:u);scanf (w%d&row) 。

12、;)elseC()Se seatrow=row;break;printf (,fcolumn:,r);scanf (r , %s,C0Se seatcolumn);for(int a=0;)if (strcmp(C()Se seatcoluinn, r , A,)=0 I strcmp(COSe seatcolumn, *BM)=0 strcmp(C 0Se. seat column, C)二=0 I strcmp (COS e. seatcolumn, MDH)=0)C()Se. seatcolumn;break;)elsecompare ();)void beforeboookingBrowse0 。

13、int i;r=0;system(,fclsrr);printf(,fntThe FlightBrowseH);printf (,fnt FlightID Beg in place EndPlace Begintime The Max costomer num The number of saleThe sold tictetsn,r);for(int i=0;iNewF1ynum+NowF1ynum;i+)r=r+Pi num;for(int i=0;ie;i+)print one plane and costomer(i): printf (,fnw);

printf (,ftprintf( 。

14、,rPress any key to continue ”); getchar ();getchar ();void print one plane and costomer(int i)printf%s%s%s%s%d%d%d (row) %s (column) n ”,Pi. ID,Pi BePlace,Pi. EndPlacetPi. Data,Pi. Max,Pi. num,COSi. seatrow,C0S i seat column);)int search()/*订票中查找航班*/int k,1=0;struct plane s;k=T;printf (,fInput the p 。

15、lace of beginplace: nw);scanf;printf (,fInput the place of endplace: nH):scanf(H%swt;printf (,rInput the time of begin: nH):scanf;for (int i=0; iNewF 1 ynum+NowF 1 ynum; i +)/ *判断输入的信息与已存在的信息是否匹配*/ (if (strcmp,Pil. BeP 1 ace) =0&strcmp,Pi. EndPlace) =:0&strcmp, Pi. Data) =0) k=i;strcpytPi Data);prin 。

16、tf (,r nnttttt Informal ion as follow: nM):print one constoiner (t):t+;

break;if(k=-l)?printf(MnnNo exist!);return -1;elsereturn k;)void Refund()/*退票*/void print one planel(int):int k=T;int i;struct plane s;D)=0)k=i;printf (,rntFlightlD Beginplace EndPlace BegintimeThenuinber of you buyn);print one p 。

17、lanel(k);break;)if (k=T)printf (f,nnNo exist!,f);elsePi num;n):printf(,fPress any key to continue”);

getchar ();getchar ();menu ();)void print one planel (int i)D,Pi. BePlace,Pi. EndPlace,Pi. Data,1); int Delect (struct plane a)/*寻找乘客所要退票的航班*/int i;for(i=0;iN;i+)if(strcmp,COSi. id)=0)ame,COSk+1. name 。

18、): strcpy (COS k. IDnuinber, COS k+1 . IDnuinber): strcpy(COSk. id,COSk+l. id);() vo i d Browse I n forma t i on () /*浏览已售票信息*/ int i;system(,rcls,r);r=0;Ifor(i=0;i NewF1ynum+NowF1ynum:i+)r=r+Pi num;printf(,rntThe Information OfSalenH);printf (,fnt Name Idcard sea trow seated uineTheflightNOn);for(i 。

19、=0;ir;i+)printf (,f%s %s%d(row) %s (column)%sn ,C()SinametCOSi ll)numberC0Si sealrow,COSi seatcolumntCOSi. id);printf (,fntprintf(,fPress any key to continue);getchar ();getchar ();menu (); void save()/*保存文件*/int w=l,m=l;r=0;FILE *fp,*fpl; int i,j;if (fp=fopenCwb)=NULL)printf(MnCannot open filen);re 。

20、turn;for (i=0;i NowF1ynum+NewF1ynum;i+)if(fwrite(&Pi,sizeof(struct plane),1,fp)!=1) priwrite error!n);w=0;if 3=1)printf(ticket file save Ok!n”);fclose(fp);if(fpl=fopen(mwbH)=NULL)prinlf(nCarmot open file n);return;for (i=0;iNowF1ynum+NewF1ynum: i+)r=r+Pi num;for(j=0;j=r; j+)if(fwrite(&Pj,sizeof(stru 。

21、ct costomer),1,fpl)1=1) printf(,rfile write error n); m=0;if(m=l)printf (,rsale file save Ok!nH);printf(,rPress any key to continue);fclose(fpl);getchar ();getchar ();menu ();void load()/*载入文件3*/ FILE *fp,*fpl; int it j,w,in; w=l;hfI;if(fp=fopen(, W)FULL)printf(MnCannot open file rT);w=0;return;NowF 。

22、lynunpO;for (1=0;!feof(fp) ; i+)fread(&Pi, sizeof (slmct plane) 11, fp); NowFlynum+;NowFl ynuni=NowFlynum-1 ;fclose(fp);if &=1)printf(MLoad ticket file 0k!nh);if(fpl=fopen(m, lb”)=NULL)printf(MnCannot open file n);m=0;return;r=0;for(j=0;!feof(fpl);j+)fread(&Pi,sizeof(struct costomer),1,fpl): NowFlynum+;r=r-l;fclose (fpl);if (m=l)printf(MLoad sale file Ok!nH);printf(MPress any key to continue”);getchar (); getchar ();menu ( 。

210f279a4cc3840d83074b311f0c0ae4.png

稿源:(未知)

【傻大方】网址:http://www.shadafang.com/a/2021/0426/0021270050.html

标题:语言|c语言飞机订票系统设计( 二 )

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值