#include<stdio.h>
main()
{
long table="0",enter=0,total=0,other=0,space=0;
char c;
while( (c=getchar())!=EOF)
{
if(c=='\n')
++enter;
else if (c=='\t')
++table;
else if (c==' ')
++space;
else
++other;
++total;
}
printf("\nthe enter is %d\n",enter);
printf("the table is %d\n",table);
printf("the space is %d\n",space);
printf("the other is %d\n",other);
printf("the total is %d\n",total);
}
文章评论(0条评论)
登录后参与讨论