#include<iostream>
#include<string.h>
#define N 1000
using namespace std;
int CalcCaptial(char *s)
{
int count = 0;
while((*s) != '\0')
{
if((int)(*s)>=65 && (int)(*s)<=90)
++count;
++s;
}
return count;
}
int main()
{
char s[N];
gets(s);
cout<<CalcCaptial(s)<<endl;
return 0;
}
华为oj 统计大写字母个数
最新推荐文章于 2022-05-15 23:06:15 发布