第1个回答 2011-01-07
#include <stdio.h>
#include <string.h>
void main()
{
char str[80];
int i, len, CountBig=0, CountSpace=0, CountOther=0;
gets(str);
len =strlen(str);
for (i=0; i < len; i++)
{
if (str[i] >= 'A' && str[i] <='Z')
{
CountBig++;
}
else if (str[i]==' ')
{
CountSpace++;
}
else
{
CountOther++;
}
}
printf("Big Letter : %d\n", CountBig);
printf("Space Letter : %d\n", CountSpace);
printf("Other Letter : %d\n", CountOther);
}本回答被提问者和网友采纳