摘要: # include# define NONBLANK 'a'/*replace string of blanks with a single blank*/main (){ int c,lastc; lastc = NONBLANK; while((c = getchar())!=EOF) { if (c != ' ') putchar(c); if (c == ' ') if (lastc != ' ') putchar(c); lastc = c; }} 阅读全文
posted @ 2013-10-17 20:07 欧小弟 阅读(182) 评论(0) 推荐(0) 编辑
摘要: # include/* 将输入复制到输出*/main(){ int c; while((c = getchar())!=EOF) putchar(c);} 阅读全文
posted @ 2013-10-17 19:51 欧小弟 阅读(110) 评论(0) 推荐(0) 编辑
摘要: # include/* 统计输入的字符数*/main(){ double nc; for (nc = 0;getchar()!=EOF;++nc) ; printf("%.0f\n",nc);} 阅读全文
posted @ 2013-10-17 19:50 欧小弟 阅读(160) 评论(0) 推荐(0) 编辑