当前位置:网站首页>C语言自动预订飞机票问题
C语言自动预订飞机票问题
2022-07-06 10:12:00 【_程序设计_】
C语言自动预订飞机票问题
2.自动预订飞机票问题(难度2)
设民航公司有一个自动预订飞机票的系统。该系统中有一张用单向链表表示的乘客表,下表中的结点按乘客姓氏的字母顺序相链。例如,下面是张某个时刻的乘客表。设计程序完成以下功能。
序号 data link rlink
1 lu 6 5
2 chan 4 9
3 wang 5 7
4 bao 0 2
5 mai 1 3
6 dong 8 1
7 xi 3 0
8 deng 9 6
9 cuang 2 8
1)建立一个静态双向链表L;
2)输入表中记录;
3)输出表中所有记录;
4)任一乘客要订票则增加相应记录;
5)某一乘客要退票时则删除相应记录;
6)有合理的提示,每个功能可以设立菜单,根据提示,可以完成相关的功能要求。
提示:
静态双向链表结构定义:
typedef struct node
{ char data[maxsize];//姓名,maxsize是可能达到的用户名的最大长度
int link,rlink; //前向、后向链,其值为乘客数组下标值
}unode;
unode user[max]; //max是可能达到的最多客户数
源码下载
链接:https://pan.baidu.com/s/1JJs9vbZahUCB6cQvXLgAVg?pwd=1111
提取码:1111
边栏推荐
- SQL statement optimization, order by desc speed optimization
- 1700C - Helping the Nature
- Rb157-asemi rectifier bridge RB157
- Scratch epidemic isolation and nucleic acid detection Analog Electronics Society graphical programming scratch grade examination level 3 true questions and answers analysis June 2022
- 30 分钟看懂 PCA 主成分分析
- 容器里用systemctl运行服务报错:Failed to get D-Bus connection: Operation not permitted(解决方法)
- JMeter interface test response data garbled
- 李书福为何要亲自挂帅造手机?
- std::true_ Type and std:: false_ type
- MS-TCT:Inria&SBU提出用于动作检测的多尺度时间Transformer,效果SOTA!已开源!(CVPR2022)...
猜你喜欢
1700C - Helping the Nature
Awk command exercise
Distiller les connaissances du modèle interactif! L'Université de technologie de Chine & meituan propose Virt, qui a à la fois l'efficacité du modèle à deux tours et la performance du modèle interacti
JMeter interface test response data garbled
Distinguish between basic disk and dynamic disk RAID disk redundant array
Introduction to the usage of model view delegate principal-agent mechanism in QT
Today in history: the mother of Google was born; Two Turing Award pioneers born on the same day
Getting started with pytest ----- test case pre post, firmware
Four processes of program operation
C language exchanges two numbers through pointers
随机推荐
2022 Summer Project Training (I)
面试突击62:group by 有哪些注意事项?
8位MCU跑RTOS有没有意义?
78 岁华科教授逐梦 40 载,国产数据库达梦冲刺 IPO
It doesn't make sense without a distributed gateway
Pourquoi Li shufu a - t - il construit son téléphone portable?
Fleet tutorial 13 basic introduction to listview's most commonly used scroll controls (tutorial includes source code)
Distiller les connaissances du modèle interactif! L'Université de technologie de Chine & meituan propose Virt, qui a à la fois l'efficacité du modèle à deux tours et la performance du modèle interacti
面向程序员的精品开源字体
d绑定函数
HMS core machine learning service creates a new "sound" state of simultaneous interpreting translation, and AI makes international exchanges smoother
The difference between parallelism and concurrency
Markdown grammar - better blogging
《ASP.NET Core 6框架揭秘》样章发布[200页/5章]
Distinguish between basic disk and dynamic disk RAID disk redundant array
Growth of operation and maintenance Xiaobai - week 7
MSF横向之MSF端口转发+路由表+SOCKS5+proxychains
MySQL 8 sub database and table backup database shell script
Jerry's setting currently uses the dial. Switch the dial through this function [chapter]
2022暑期项目实训(三)