当前位置:网站首页>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
边栏推荐
- C语言通过指针交换两个数
- I want to say more about this communication failure
- 带你穿越古罗马,元宇宙巴士来啦 #Invisible Cities
- [Android] kotlin code writing standardization document
- 推荐好用的后台管理脚手架,人人开源
- Jerry's watch reading setting status [chapter]
- Selected technical experts from China Mobile, ant, SF, and Xingsheng will show you the guarantee of architecture stability
- 趣-关于undefined的问题
- Interview assault 63: how to remove duplication in MySQL?
- J'aimerais dire quelques mots de plus sur ce problème de communication...
猜你喜欢
Is it meaningful for 8-bit MCU to run RTOS?
关于这次通信故障,我想多说几句…
Getting started with pytest ----- test case pre post, firmware
FMT开源自驾仪 | FMT中间件:一种高实时的分布式日志模块Mlog
std::true_ Type and std:: false_ type
RB157-ASEMI整流桥RB157
STM32按键状态机2——状态简化与增加长按功能
The easycvr platform reports an error "ID cannot be empty" through the interface editing channel. What is the reason?
Selected technical experts from China Mobile, ant, SF, and Xingsheng will show you the guarantee of architecture stability
kivy教程之在 Kivy 中支持中文以构建跨平台应用程序(教程含源码)
随机推荐
MarkDown语法——更好地写博客
Shell input a string of numbers to determine whether it is a mobile phone number
高精度运算
Prophet模型的简介以及案例分析
Jerry's watch reads the file through the file name [chapter]
Take you through ancient Rome, the meta universe bus is coming # Invisible Cities
TCP packet sticking problem
Kivy tutorial: support Chinese in Kivy to build cross platform applications (tutorial includes source code)
微信小程序中给event对象传递数据
2022 Summer Project Training (I)
Cool Lehman has a variety of AI digital human images to create a vr virtual exhibition hall with a sense of technology
Heavy! Ant open source trusted privacy computing framework "argot", flexible assembly of mainstream technologies, developer friendly layered design
2022暑期项目实训(三)
编译原理——预测表C语言实现
Introduction to the usage of model view delegate principal-agent mechanism in QT
Pytest learning ----- pytest confitest of interface automation test Py file details
從交互模型中蒸餾知識!中科大&美團提出VIRT,兼具雙塔模型的效率和交互模型的性能,在文本匹配上實現性能和效率的平衡!...
李書福為何要親自掛帥造手機?
The shell generates JSON arrays and inserts them into the database
ASEMI整流桥DB207的导通时间与参数选择