ustc_acm_question 古城微笑少年丶 2022-08-05 05:29 145阅读 0赞 # USTC ACM Question # ## problem 1001 Easy or Not ## ### Description ### We are wondering how easy a problem can be. According to recent research, the most easy problem may be the one which requires to output exactly the input, other than the classical A+B Problem. As our best programmer, you are asked to write a program to prove the conclusion. ### Input ### Lots of characters. ### Output ### Characters exactly the same as input. ### Sample Input ### The quick brown fox jumps over the lazy dog. question = to ? be : !be; ### Sample Output ### The quick brown fox jumps over the lazy dog. question = to ? be : !be; #include <stdio.h> int main(int argc, const char * argv[]) { char output; while ((output = getchar()) != EOF) { putchar(output); } return 0; } 主要是你并不知道有多少行,每行有多少字符,故需要一个一个读入,注意输入结束是EOF这个符号而不是0
还没有评论,来说两句吧...