1 #include <stdio.h>
 2 #include <stdlib.h>
 3 int main()
 4 {
 5     int space=0, tab=0, line=0, c;
 6     while ((c=getchar())!=EOF){
 7         if (c==' ')
 8             ++space;
 9         if (c=='\t')
10             ++tab;
11         if (c=='\n')
12             ++line;
13     }
14     printf("space=%d, tab=%d, line=%d\n", space, tab, line);
15     system("pause");
16     return 0;
17 }

 

posted on 2020-04-23 21:49  杪杪  阅读(453)  评论(0)    收藏  举报