| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1293 人关注过本帖
标题:[求助]小弟初学,遇到问题,请各位大侠指点迷津~万分感谢
取消只看楼主 加入收藏
编程驴
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2004-8-15
收藏
 问题点数:0 回复次数:0 
[求助]小弟初学,遇到问题,请各位大侠指点迷津~万分感谢

You are to analyse and design a solution for a simple line editor program which responds to the following commands:

E: Enters edit mode. Allows entry of text. Assume each line is a max of 80 characters and terminate by entering the # symbol. N: Displays line N. and sets the line index to N. D: Deletes the current line. A: Append mode. Text is inserted after the current line. To leave append mode the user types a #. P: Print the document on screen. Q: Quit.

Your proposed solution will have two modes of operation. The default setting is command mode i.e. waiting for one of the above commands. Once a command is entered the program will be in operation mode i.e. inside one of the above commands. Once the command is completed it will be back in command mode. It is strongly recommended you develop the solution in a modular fashion i.e. not simply one huge block of code.

大概意思就是编一个简单的行输入程序,按E代表输入数据,每个被输入的数据后要有#作为结束。按N再加行数号可以进入被选行。D意思是删除当前所在的行。A的意思是插入,P为打印,Q是退出。里面还特别指出每次输入最多80个字符。进入程序后按着几个字母就可以表现所要做的command. 小弟为初学者,虽然问题简单,但是还是没有什么思路。望各位老大们帮助~万分感谢 如果觉得麻烦,给个pseudocode介绍一下大体思路也行。3Q!

搜索更多相关主题的帖子: 大侠 小弟 指点迷津 初学 
2004-08-15 23:07
快速回复:[求助]小弟初学,遇到问题,请各位大侠指点迷津~万分感谢
数据加载中...
 
   



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

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