《c程序设计语言》读书笔记--每行一个单词打印输入的字符,除去空符

#include <stdio.h>

int main()
{

    int c;

    while((c = getchar()) != EOF)
    {

        if(c != '\n' && c != ' ' && c != '\t')
            {
               putchar(c);
               printf("\n");
            }
    }

    return 0;
}


每行一个单词打印输入的字符,除去空符。

 

posted @ 2014-10-27 14:36  司空格子Ored  阅读(176)  评论(0编辑  收藏  举报