Network -1094 C language question - a character string input and output processing

 

 

The first pass of the time to write my own uses a if-else structure, the output is wrong, changed over a period of time or not, it was still too dishes. Then I see a solution to a problem you, learning to be a new way to consider the issue. An algorithm is started with a thought of their cycle input, and output each time the input process, the original request output before the output line with a counter n to identify, for each string directly after the output on the line. Own implementation of the code space will be treated as a new line, and then had been a mistake. The idea is quite ingenious solution to a problem, use a space to separate them, and then use a string array to retain, each string can do one of the input and output.

Guess you like

Origin www.cnblogs.com/blog-of-guoqi/p/11565001.html