#include<stdio.h>
#define SIZE 1024
int main()
{
char a[SIZE];
char c;
int i;
int count=0;
printf("\nType in something you want to express:");
while(i<(SIZE-1)&&(c=getchar())!=EOF)
{
a[i]=c;
if(a[i]=='.'||a[i]=='!'||a[i]=='?')
count++;
i++;
}
a[i]='\0';
printf("You typed in %d sentence(s)",count);
return 0;
}
å·¥å
·ãç¼è¯é项ã代ç /ä¼åãè¿æ¥å¨ 产è°è¯ä¿¡æ¯å§noæ¹yeså追é®
并ä¸ç®¡ç¨ãã
温馨提示:答案为网友推荐,仅供参考