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。c语言课程设计-飞机定票系统(编辑修改稿)
相关推荐
(struct course))。 fscanf(fp,%d%s%s%s%d%d%s%d,amp。 p1num1,p1name1,p1major,p1type,amp。 p1credit,amp。 p1period,p1teacher,amp。 p1people)。 while(!feof(fp)) { N1=N1+1。 if(N1==1) head1=p1。 else p2next=p1。
{ Chazhao()。 } else { system(cls)。 menu()。 } } fread(amp。 i,sizeof(struct ima),1,fp)。 } fclose(fp)。 printf(\t\t\t\t\t输入的编号不存在,请您重新输入 ......)。 goto finID。 } 物品信息浏览函数: void Liulan() { struct ima i。 int
果有两个,一是心理上掩盖环境噪声,二是创造与室内环境相适应的气氛,它在宾馆、酒店、餐厅、商场、 医院、办公楼等广泛的应用。 (三)、广播音响系统的组成 不管哪一种广播音响系统,基本可分四个部分:节目设备、信号的放大处理设备、传输线路和扬声器系统。 节目源设备 :节目源通常为无线电广播,激光唱机和录音卡座等设备提供,此外还有传声器、电子乐器等。 信号放大器和处理设备 :包括均衡器、前置放大器
/*交换前后结点中的英语成绩,使之与学号相匹配 */ fen=maxshuxue。 maxshuxue=p1shuxue。 p1shuxue=fen。 /*交换前后结点中的数学成绩,使之与学号相匹配 */ } } max=head。 p1=head。 /*重新使 max,p指向链表头 */ } 9 p2next=NULL。 /*链表结尾 */ printf(输入的学生数为 :%d个 !\n,n)
型变量,且 a 的初值为 6,则计算表达式后 a 的值为 ______。 a+=a=a*a 答 案: 60 详解: 表达式从左向右运算,先计算表达式 a=a36 后 a 为 30,再计算表达式 a=a+a 后 a 的值变为 60。 (十二 ) 条件运算 : 条件运算符的基本形式及功能: 条件运算是一种在两个表达式的值中选择一个的操作。 它的一般形式为: e1?e2:e3 它的操作过程为,若 e1
下选项中非法的表达式是 A) 0=x100 B) i=j==0 C) (char)(65+3) D) x+1=x+1 46. 有以下程序 main() { int a=1,b=2,m=0,n=0,k。 k=(n=ba)||(m=aB)。 printf(%d,%d\n,k,m)。 } 程序运行后的输出结果是 A) 0,0 B) 0,1 C) 1,0 D) 1,1 47. 有定义语句: int x,