版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/a870542373/article/details/50412547
#include<stdio.h>
void main()
{
int a=0,b=0;
char *p,s[20];
while((s[i]=getchar())!='\n')i++;
p=s;
while(*p!=10)
{
if(*p>='A'&&*p<='Z')
a++;
else if(*p>='a'&&*p<='z')
b++;
p++;
}
printf("大写字母 %d 小写字母 %d\n",a,b);
}