| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 652 人关注过本帖
标题:有个c语言的编程问题...
取消只看楼主 加入收藏
c语言白痴
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2007-8-16
收藏
 问题点数:0 回复次数:4 
有个c语言的编程问题...
to replace tab characters by a string of one or more ‘>’ characters so that the input line length is made up to the next multiple of 8, which means that characters following tabs will appear in columns 9, 17, 25, 33 and so on. For example, if the input looks like this (where the positions of tab characters are indicated by the symbol "这里是有个一个符号的键盘打不出来,我用%%代替")
Family%%Given%Phone
Simpson%%Homer%%555-1234
Gumble%%Barney%%555-9876
then the output should look like this (the ‘G’ of ‘Given’ is in column 9 and the ‘P’ of ‘Phone’ is in column 17)
Family>>Given>>>Phone
Simpson>Homer>>>555-1234
Gumble>>Barney>>555-9876

哪位高手可以帮忙解答下...
搜索更多相关主题的帖子: c语言 
2007-08-16 21:25
c语言白痴
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2007-8-16
收藏
得分:0 

就是说用一个或者多个">"字符来代替tab字符.简单点说就是跟在tab字符后面的字母要出现在第9行.第17行。第35行...

楼上的。有这么复杂吗??

2007-08-17 12:58
c语言白痴
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2007-8-16
收藏
得分:0 
晕.你完全误解我的意思了..我只是觉得应该不会很复杂..因为我做了第一个.

copies each character from standard input directly to standard output, except that each space is replaced by a tilde (‘~’).if the input looks like this
The quick brown fox jumps
over the lazy dog.
then the output should look like this
The~quick~brown~fox~jumps
over~the~lazy~dog.
The program should continually process input until it reaches end-of-file. The core of the program will be a loop with the following structure:
while (get a character from stdin and test for end-of-file) {
put the character (or its replacement) to stdout
}

第二个应该只需要在这个基础上修改下便可,所以我觉得应该没那么复杂的..你看看第一个.
2007-08-17 13:29
c语言白痴
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2007-8-16
收藏
得分:0 
2007-08-17 15:36
c语言白痴
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2007-8-16
收藏
得分:0 
回复:(c语言白痴)有个c语言的编程问题...
还有哪位高手可以解答下...
2007-08-19 06:39
快速回复:有个c语言的编程问题...
数据加载中...
 
   



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

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