晕.你完全误解我的意思了..我只是觉得应该不会很复杂..因为我做了第一个.
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
}
第二个应该只需要在这个基础上修改下便可,所以我觉得应该没那么复杂的..你看看第一个.