| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1564 人关注过本帖
标题:求这道题的c语言编程 感谢大佬 我的同学 自动避让
只看楼主 加入收藏
waitingforwh
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2018-5-10
结帖率:0
收藏
已结贴  问题点数:20 回复次数:4 
求这道题的c语言编程 感谢大佬 我的同学 自动避让
Recently, Kale finds that his mobile phone address book can’t add new friends’ phone numbers.  He turns to ask for your help because he knows that you are learning high-level programming language. To help him, you need to design a new mobile phone address book in accordance with the following requirements.

       Dynamic memory structure should be used because of his large social circles. He often makes new friends, but also deletes phone numbers of those who hasn’t heard from for a long time. But, if they, whose phone number was deleted , re-contact Kale, he would like to add their phone numbers into the phone address book.

Notice:

       Kale’s original phone book includes groups of names and phone numbers, a name is expressed as a string whose length will not be longer than 20; similarly, a phone number is expressed as a string, whose length will not exceed 20. Names and phone numbers don't have extra space characters.

       To meet Kael’s requirements, you should include the operations as follows:

Insert A Num behind B : where A, B are names and Num is the phone number of A. if A is already in phone address book, then update the phone number; or add A behind B (if there was no B in list, then add A to the beginning of the list).

Delete A: Remove buddy A from the address book (if there was no A in list, you may do nothing).

In order to validate your program, it is necessary to design the operation as follow:

Print: Output the entire address book in sequence (Output all buddy's names and phone numbers one time, separated by one space)

Requirements: This experiment must be achieved with a linked list.

The format of the input data:

From the first line to the end: Each line is an operation, you should execute them in turns.

Terminator: “End” indicates the termination of the input.

The format of the output data:

Each operation needed to output exports with one line.

Sample

Input:

Insert LiLei 14068888 behind Nobody
Insert Joker 04517999 behind LiLei
Insert Healer 987213 behind Joker
Print
Delete LiLei
Print
End

Output:

LiLei 14068888
Joker 04517999
Healer 987213
Joker 04517999
Healer 987213
搜索更多相关主题的帖子: address numbers the Insert Output 
2018-05-10 14:50
陈智
Rank: 2
等 级:论坛游民
帖 子:2
专家分:19
注 册:2018-5-10
收藏
得分:5 
表示一脸蒙蒙的,啥符号都没
2018-05-10 22:11
自学的数学
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:贵宾
威 望:46
帖 子:967
专家分:4146
注 册:2017-11-15
收藏
得分:5 
这是编程课堂,不是英语课堂。
2018-05-10 22:55
wmf2014
Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19
等 级:贵宾
威 望:216
帖 子:2039
专家分:11273
注 册:2014-12-6
收藏
得分:5 
应该不难,代码实现几个功能就可以了:从字符串中分解出单词、识别关键词“Insert、Delete、Print、End、behind”(其中behind是否理解都无所谓)、根据关键词完成插入、删除、输出、结束的操作。

能编个毛线衣吗?
2018-05-11 09:42
邹阳
Rank: 6Rank: 6
等 级:侠之大者
威 望:4
帖 子:124
专家分:402
注 册:2015-10-8
收藏
得分:5 
大体看了一下,是要使用C语言完成搭建一个数据库任务,并附带增删改查的功能吧。

I'm a new comer
2018-05-13 15:20
快速回复:求这道题的c语言编程 感谢大佬 我的同学 自动避让
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.362874 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved