c语言课程设计-飞机定票系统(编辑修改稿)内容摘要:

适时的处理 { printf(\n\t\t 您输入的时间有点不和实际。 请确定是否重新输入(y/n))。 ch1=getch()。 //输入一个字符 if(ch1==39。 n39。 ||ch==39。 N39。 )//判断字符 { printf(\n\t\t您放弃时间重新输入。 )。 goto gomi。 //转至出发分的输入 } printf(\n\t\t请重新输入时间。 )。 goto go。 } fflush(stdin)。 gomi:printf(\n出发时间分 :)。 24 scanf(%d,amp。 p_fight[count].)。 if(!(0=p_fight[count].amp。 amp。 p_fight[count].inute=59)) { printf(\n\t\t 您输入的时间有点不和实际。 请确定是否重新输入(y/n))。 ch1=getch()。 if(ch1==39。 n39。 ||ch==39。 N39。 ) { printf(\n\t\t您放弃时间重新输入。 )。 goto arry。 } printf(\n\t\t请重新输入时间。 )。 goto gomi。 } fflush(stdin)。 arry:printf(\n到达时间年 :)。 //输入到达时间 scanf(%d,amp。 p_fight[count].)。 if(p_fight[count].p_fight[count].)//判断输入到达的年份是否为有效,到达时间不能小于出发时间(下同) { printf(您输入的到达时间小于起飞时间 ,请重新输入到达时间年 !)。 goto arry。 } if(!(1500p_fight[count].amp。 amp。 p_fight[count].ryear4000)) { 25 printf(\n\t\t 您输入的年份有点不和实际。 请确定是否重新输入(y/n))。 ch1=getch()。 if(ch1==39。 n39。 ||ch==39。 N39。 ) { printf(\n\t\t您放弃重新输入年份。 )。 goto arrm。 } printf(\n\t\t请重新输入年份。 )。 goto arry。 } fflush(stdin)。 arrm:printf(\n到达时间月 :)。 scanf(%d,amp。 p_fight[count].)。 if(p_fight[count].==p_fight[count].amp。 amp。 p_fight[count].p_fight[count].) { printf(您输入的到达时间小于起飞时间 ,请重新输入到达时间月 !)。 goto arrm。 } if(!(0p_fight[count].amp。 amp。 p_fight[count].th=12)) { printf(\n\t\t 您输入的月份有点不和实际。 请确定是否重新输入(y/n))。 ch1=getch()。 if(ch1==39。 n39。 ||ch==39。 N39。 ) { 26 printf(\n\t\t您放弃重新输入月份。 )。 goto arrd。 } printf(\n\t\t请重新输入月份。 )。 goto arrm。 } fflush(stdin)。 arrd:printf(\n到达时间日 :)。 scanf(%d,amp。 p_fight[count].)。 if(p_fight[count].==p_fight[count].amp。 amp。 p_fight[count].p_fight[count].) { printf(您输入的到达时间小于起飞时间 ,请重新输入到达时间日 !)。 goto arrd。 } if(!(0p_fight[count].amp。 amp。 p_fight[count].=31)) { printf(\n\t\t 您输入的日有点不和实际。 请确定是否重新输入(y/n))。 ch1=getch()。 if(ch1==39。 n39。 ||ch==39。 N39。 ) { printf(\n\t\t您放弃日重新输入。 )。 goto arrh。 } printf(\n\t\t请重新输入日。 )。 27 goto arrd。 } fflush(stdin)。 arrh:printf(\n到达时间时 :)。 scanf(%d,amp。 p_fight[count].)。 if(p_fight[count].==p_fight[count].amp。 amp。 p_fight[count].==p_fight[count].amp。 amp。 p_fight[count].p_fight[count].) { printf(您输入的到达时间小于起飞时间 ,请重新输入到达时间时 !)。 goto arrh。 } if(!(0=p_fight[count].amp。 amp。 p_fight[count].our=23)) { printf(\n\t\t 您输入的时间有点不和实际。 请确定是否重新输入(y/n))。 ch1=getch()。 if(ch1==39。 n39。 ||ch==39。 N39。 ) { printf(\n\t\t您放弃时间重新输入。 )。 goto arrmi。 } printf(\n\t\t请重新输入时间。 )。 goto arrh。 } fflush(stdin)。 28 arrmi:printf(\n 到达时间分 :)。 scanf(%d,amp。 p_fight[count].)。 if(p_fight[count].==p_fight[count].amp。 amp。 p_fight[count].==p_fight[count].amp。 amp。 p_fight[count].==p_fight[count].amp。 amp。 p_fight[count].fighp_fight[count].) { printf(您输入的到达时间小于起飞时间 ,请重新输入到达 时间分 !)。 goto arrmi。 } if(!(0=p_fight[count].amp。 amp。 p_fight[count].rminute=59)) { printf(\n\t\t 您输入的时间有点不和实际。 请确定是否重新输入(y/n))。 ch1=getch()。 if(ch1==39。 n39。 ||ch==39。 N39。 ) { printf(\n\t\t您放弃时间重新输入。 )。 goto reb。 } printf(\n\t\t请重新输入时间。 )。 goto arrmi。 } fflush(stdin)。 reb:printf(\n折扣 :)。 scanf(%d,amp。 p_fight[count].)。 if(!(0p_fight[count].amp。 amp。 p_fight[count]. 29 =100)) { printf(\n\t\t 您输入的折扣有点不和实际。 请确定是否 重新输入(y/n))。 ch1=getch()。 if(ch1==39。 n39。 ||ch==39。 N39。 ) { printf(\n\t\t您放弃折扣重新输入。 )。 goto alls。 } printf(\n\t\t请重新输入折扣。 )。 goto reb。 } fflush(stdin)。 alls:printf(\n总票数 :)。 scanf(%d,amp。 p_fight[count].)。 fflush(stdin)。 surp:printf(\n剩余票数 :)。 scanf(%d,amp。 p_fight[count].)。 if(p_fight[count].p_fight[count].ticket) { printf(您输入的剩余票不合乎实际 !!!请重新输入 !)。 goto surp。 } fflush(stdin)。 //清空缓存 fwrite(amp。 p_fight[count++].fight1,sizeof(struct fightinfo),1,fightfile)。 //将信息写入文件 30 printf(是否录入下一个飞机票信息 (y/n))。 //询问是否输入下一个机票信息 ch=getch()。 //输入一个字符 if(ch==39。 y39。 ||ch==39。 Y39。 )//判断字符的输入 { system(cls)。 printf(\n 请输入下一个飞机票信息 \n)。 printf(\n 航班号 :)。 continue。 //继续输入下一个飞机票信息 } else { printf(\n\n飞机票信息录入结束,返回 !)。 fclose(fightfile)。 //关闭文件 getch()。 //返回子菜单 system(cls)。 //清屏 return。 } } printf(输入有误,终止飞机票信息录信,返回 !)。 getch()。 //等待输入字符 system(cls)。 return。 //返回 31 :( 附) /* **************************************** * Author:飞机订票系统组 * Datetime:2020/06*/ include include include include include define fightMAX 1000 void inputinfo(struct allfightinfo *)。 //机票信息录入 void filename1read (struct allfightinfo *)。 //旅客信息信息读取 void allabout(struct allfightinfo *)。 //查询所有信息 void mofinfo(struct allfightinfo *)。 //修改机票信息 void password()。 //密码验证 int checkcode()。 //身份验证 void allabout(struct allfightinfo *)。 //查询所有信息 void mofinfo(struct allfightinfo *)。 //修改机票信息 void password()。 //密码验证 int checkcode()。 //身份验证 void modifycode()。 //修改登陆密码 void delinfo(struct allfightinfo *)。 //删除 void fightcontrol(struct allfightinfo *)。 //机票管理模块 void bookticket(struct allfightinfo *p_fight)。 //订票系统 void display(struct allfightinfo *p_fight)。 //显示模块 void returnticket(struct allfightinfo *p_fight)。 //退票 void enquiry(struct allfightinfo *p_fight)。 //查询模块 void wele()。 //欢迎 void modifycode()。 //修改登陆密码 void delinfo(struct allfightinfo *)。 //删除 void fightcontrol(struct allfightinfo *)。 //机票管理模块 void bookticket(struct allfight。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。