#include
#include
void main()
{ int i=0,count1[26]={0},count2[26]={0};
char ch[100];
printf("enter a sentence:");
gets( ch );
while( ch[i] )
{if(ch[i]>='a'&&ch[i]<='z') count1[ch[i]-'a']++;
else if(ch[i]>='A'&&ch[i]<='Z') count2[ch[i]-'A']++;i++;}
for(i=0;i<26;i++)
{if( i % 5==0 )putchar('\n'); printf(" 字母%c : %d ",'a'+i,count1[i]);}
for(i=0;i<26;i++)
{if( i % 5==0 )putchar('\n'); printf(" 字母%c : %d ",'A'+i,count2[i]);}
}