3 /2 6 /2 0 1 3 第1 页 xxxx大学xx学院 C 语 言 课 程 设 计 题目:飞机订票系统 专业: 计算机科学与技术 班级: 姓名: 完成时间: 3 /2 6 /2 0 1 3 第2 页 目录 第一部分:源程序(3-12页) 第二部分:函数流程图(13-25页) (1)menu函数流程图(第13页) (2)enter函数流程图(第14页) (3)Order 函数流程图(第15页) (4)input 函数流程图(第16页) (5)brow se 函数流程图(第17页) (6)Search_time 函数流程图(第18页) (7)Search_end 函数流程图(第19页) (8)search 函数流程图(第20页) (9)void menu1 函数流程图(第21页) (10)book 函数流程图(第22页) (11)back函数流程图(第23页) (12)save 函数流程图(第24页) (13)load 函数流程图(第25页) 第三部分:心得体会(第26-27页) 3 /2 6 /2 0 1 3 第3 页 第一部分:源程序 #include #include #include #define N 1000 typedef struct plane { char ID[10]; /*航班代号*/ char BePlace[10];/*飞机起飞地点*/ char EnPlace[10];/*飞机降落终点*/ char data[15];/*飞机起飞时间*/ int max;/*飞机最大乘客人数*/ int price;/*飞机票价*/ int num;/*飞机已售票数*/ }PLANE; PLANE ti[N]; int n;/*当前的航班数目*/ void menu(); void menu1(); void input(int i) { printf("请输入航班代号:\n"); scanf("%s",ti[i].ID); printf("请输入起飞地点:\n"); scanf("%s",ti[i].BePlace); printf("请输入降落地点:\n"); scanf("%s",ti[i].EnPlace); printf("请输入起飞时间:\n"); scanf("%s",ti[i].data); printf("请输入航班的最大载客人数:\n"); scanf("%d",&ti[i].max); printf("请输入航班的票价:\n"); scanf("%d",&ti[i].price); ti[i].num=0; } 3 /2 6 /2 0 1 3 第4 页 void enter() { int i; system( "cls" ); printf("请输入航班的数目(0-%d)?:",N); scanf("%d",&n); /*要输入的记录个数*/ printf("\n请输入数据\n\n"); for(i=0;i