📄 2341.txt
字号:
#define debug 0
#define NMAX 10001
#define INF 1000000001
#include<stdio.h>
#include<ctype.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>
char str[NMAX];
int endflag;
int sum;
int checkend(char cs)
{
switch (cs)
{
case '.':
case '!':
case '?':return 1;
default: return 0;
}
return 0;
}
void solve()
{
endflag=1;
char cs;
if(scanf("%c",&cs)==EOF)
return ;
while(1)
{
if(isalpha(cs))
{
if(endflag==1)
{
endflag=0;
if(islower(cs))
sum++;
}
while(1)
{
if(scanf("%c",&cs)==EOF)
return ;
if(isupper(cs))
sum++;
if(!isalpha(cs))
break;
}
}
if(checkend(cs))
{
endflag=1;
}
if(scanf("%c",&cs)==EOF)
return ;
}
}
main()
{
#if debug
freopen("in.txt","r",stdin);
freopen("out.txt","w",stdout);
#endif
solve();
printf("%d",sum);
#if debug
fclose(stdin);
fclose(stdout);
#endif;
return 1;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -