资源简介
C语言的航空订票系统,有查询、录入、删除、修改等一系列功能,附设计报告

代码片段和文件信息
#include
#include
#include
#define OK 1
#define TRUE 1
#define FALSE 0
#define ERROR 0
#define OVERFLOW -2
#define PR printf
typedef int status;
typedef struct airline{
char line_num[8];//航班号
char plane_num[8];//飞机号
char end_place[20];//目的的
int total;//座位总数
int left;//剩余座位
struct airline *next;//下一个结点
}airline;//定义一个airline=航班信息结构体
typedef struct customer{
char name[9];//顾客名
char line_num[8];//航班号
int seat_num;//座位号
struct customer *next;//下一个结点
}customer;//定义customer=顾客信息存储结构体
airline *init_airline(){//初始化链表
airline *l;
l=(airline*)malloc(sizeof(airline));
if(l==NULL){
exit(0);
}
l->next=NULL;
return l;
}
customer * init_customer(){//初始化链表
customer *l;
l=(customer*)malloc(sizeof(customer));
if(l==NULL){
exit(0);
}
l->next=NULL;
return l;
}
status insert_airline(airline **pchar *line_numchar *plane_numchar *end_placeint totalint left){//airline链表插入操作
airline *q;
q=(airline*)malloc(sizeof(airline));
strcpy(q->line_num line_num);//录入航班号
strcpy(q->plane_num plane_num);//录入飞机号
strcpy(q->end_place end_place);//录入目的地
q->total =total;
q->left =left;
q->next=NULL;
(*p)->next=q;
(*p)=(*p)->next;
// printf(“insert %d %dis succssed!\n“ebl);
return OK;
}
status insert_customer(customer **pchar *namechar *line_numint seat){//customer链表插入操作
customer *q;
q=(customer*)malloc(sizeof(customer));
strcpy(q->name name);//录入客户姓名
strcpy(q->line_num line_num);//录入客户需要的航班号
q->seat_num =seat;//实现客户座号信息的系统编排
q->next=NULL;
(*p)->next=q;
(*p)=(*p)->next;
// printf(“insert %d %dis succssed!\n“ebl);
return OK;
}
airline *modefy_airline(airline *lchar *line_num)//修改航班信息 修改某航班信息
{
airline *p;
p=l->next ;
for(;p!=NULL;p=p->next )
{
if(strcmp(line_nump->line_num )==0)
{
p->left ++;
PR(“modefy %s\n“p->line_num );
return l;
}
}
PR(“没有这个航班,无法完成修改任务!\n“);
return 0;
}
airline *delete_airline(airline *hchar *line_num)//3修改航班信息 1删除某航班信息
{
airline *p*pr;
pr=h;
p=pr->next ;
while(p!=NULL)
{
if(strcmp(line_nump->line_num )==0)
{
pr->next =p->next ;
PR(“删除 %s 航班\n“p->line_num );
return h;
}
pr=pr->next ;
p=pr->next ;
}
PR(“无此航班,无法删除!\n“);
return 0;
}
customer *delete_customer(customer *hchar *line_num)
{
customer *p*pr;
pr=h;
p=pr->next ;
while(p!=NULL)
{
if(strcmp(line_nump->line_num )==0)
{
pr->next =p->next ;
}
pr=pr->next ;
p=pr->next ;
}
// PR(“无此航班,无法删除!\n“);
return h;
}
customer *delete_cus(customer *hairline *lchar *name)
{
customer *p*pr;
char line_num[8];
// qr=h;
pr=h;
p=pr->next ;
// PR(“开始删除\n“);
while(p!=NULL)
{
if(strcmp(namep->name )==0)
{
strcpy(line_nump->line_num );
l=modefy_airline(lline_num);
pr->next =p->next ;
PR(“顾客 %s 退票成功!\n“p->name );
return h;
}
pr=pr->next ;
p=pr->next ;
}
P
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 33792 2009-04-22 17:22 Debug\vc60.idb
文件 45056 2009-04-22 17:22 Debug\vc60.pdb
文件 204895 2009-04-22 17:22 Debug\订票.exe
文件 223784 2009-04-22 17:22 Debug\订票.ilk
文件 39491 2009-04-22 17:22 Debug\订票.obj
文件 191000 2009-04-22 17:22 Debug\订票.pch
文件 427008 2009-04-22 17:22 Debug\订票.pdb
文件 13567 2009-04-22 17:17 订票.c
文件 3377 2009-04-22 17:22 订票.dsp
文件 516 2009-04-22 17:22 订票.dsw
文件 41984 2009-04-22 17:22 订票.ncb
文件 48640 2009-04-22 17:22 订票.opt
文件 734 2009-04-22 17:22 订票.plg
文件 306688 2009-04-22 17:18 订票系统.doc
目录 0 2009-10-24 23:25 Debug
----------- --------- ---------- ----- ----
1580532 15
相关资源
- c语言实现火车订票系统(控制台)源
- 用C语言实现一个火车站的订票系统
- 广东工业大学数据结构课程设计航空
- 火车票模拟订票系统
- c++ 飞机订票系统设计及分析包含源代
- 用c写的航空订票系统 航班信息改变
- 航空客运订票系统 c语言 数据结构作
- 航空订票系统C++实现
- 火车订票系统mfc+sql希望能对大家有所
- 航空客运订票系统数据结构课程设计
- C#火车订票系统
- 火车订票系统MFC
- 用c++做的简单火车订票系统
- MFC航空客运订票系统
- 数据结构课程设计-航空订票系统
- 机票订票系统可行性分析
- 飞机订票系统 c++ 课设
- 航空订票系统C语言顺序表版
- 飞机订票系统 C++
- 航空客运订票系统有完整代码,设计
- 飞机订票系统 C语言期末作业 zxf
- 航班订票系统课程设计源代码
- 基于C++数据结构编写的航空订票系统
- 数据结构大作业(C语言)实验报告
- C++源代码飞机订票系统
- 用C++实现电影院订票系统
- 数据结构大作业航空客运订票系统
- 火车票订票系统模拟 (C 语言)
- 飞机订票系统课程设计报告及源代码
- C航空订票系统-课程设计
评论
共有 条评论