struct num
{
int Letnum;
int Dignum;
int Othernum;
};
struct num Print_Num()
{
struct num num_s={0,0,0};
char ch = '\0';
while((ch = getchar()) != '\n')
{
if(isalpha(ch))
{
num_s.Letnum += 1;
}else if(isdigit(ch))
{
num_s.Dignum += 1;
}else
{
num_s.Othernum += 1;
}
}
return num_s;
}
int main()
{
struct num num1 = {0,0,0};
num1=Print_Num();
printf("the number of letter is %d ,dig is %d ,other is %d\n",num1.Letnum,num1.Dignum,num1.Othernum);
return 0;
}