c语言程序设计火车站售票系统,C语言程序-火车站售票系统程序

《C语言程序-火车站售票系统程序》由会员分享,可在线阅读,更多相关《C语言程序-火车站售票系统程序(11页珍藏版)》请在人人文库网上搜索。

1、实用标准火车站售票查询系统:#include #include #include #include int shoudsave=0 ;int count1=0,count2=0,mark=0,mark1=0 ;/*定义存储火车信息的结构体*/struct trainchar num10;/* 列车号 */char city10;/* 目的城市 */char takeoffTime10;/*发车时间 */char receiveTime10;/*到达时间 */int price;/* 票价*/int bookNum ;/* 票数 */;/*订票人的信息*/ struct manchar num1。

2、0;/*ID*/char name10;/* 姓名 */int bookNum ;/* 需求的票数*/;/*定义火车信息链表的结点结构*/ typedef struct nodestruct train data ;struct node * next ;Node,*Link ;/*定义订票人链表的结点结构*/typedef struct peoplestruct man data ;struct people*next ;bookMan,*bookManLink ;/*初始界面*/ void printInterface()文档puts(I*”);puts(“*Welcome to use 。

3、the system of booking tickets);puts(I*”);puts(“*You can choose the operation:*);puts(“*1:Insert a train information*);puts(“*2:Inquire a train information*);puts(“*3:Book a train ticket*);puts(“*4:Update the train information*);puts(“*5:Advice to you about the train*);puts(*6:save information to fil。

4、e*);puts(*7:quit the system*);puts(*);/*添加一个火车信息*/void In sertTra inin fo(L ink lin khead)struct node *p,*r,*s ;char num10;r = linkhead ;s = linkhead-next ;while(r-next!=NULL)r=r-next ;while(1)printf(please input the number of the train(0-return);scanf(%s,num);if(strcmp(num,0)=0)break ;/*判断是否已经存在*/w。

5、hile(s)if(strcmp(s-data.num,num)=0)printf(the train %shas been born!n,num); return ;s = s-next ;p = (struct n

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值