摘要: 问题描述 练习1-22 编写一个程序,把较长的输入行“折”成短一些的两行或者多行,折行的位置在输入行的第N列之前的最后一个非空格之后。要保持程序能够智能地处理输入行很长以及在制定的列前没有空格或者制表符时的情况。 Write a program to "fold" long input lines 阅读全文
posted @ 2020-05-04 20:01 益生李佳菌 阅读(379) 评论(0) 推荐(1)
摘要: 问题描述 编写程序entab,将空格串替换为最少数量的制表符和空格,但要保持单词之间的间隔不变。假设制表符终止位的位置与练习1 - 20的detab程序的情况相同。当使用一个制表符或者一个空格都可以到达下一个制表符终止位时,选用哪种替换字符比较好 ? Write a program entab th 阅读全文
posted @ 2020-05-03 18:35 益生李佳菌 阅读(438) 评论(0) 推荐(0)
摘要: 问题描述 Write a program detab that replaces tabs in the input with the proper number of blanks to space to the next tab stop. Assume a fixed set of tab s 阅读全文
posted @ 2020-04-28 11:27 益生李佳菌 阅读(456) 评论(0) 推荐(0)