#include<stdio.h>
int main()
{
int letter = 0, space = 0, number = 0, other = 0;
char c;
printf("Please enter a line of characters:\n");
while((c = getchar()) != '\n')
{
if(((c >= 'a')&&(c <= 'z'))||((c >= 'A')&&(c <= 'Z')))
{
letter++;
}
else if(c == ' ')
{
space++;
}
else if((c >= '0')&&(c <= '9'))
{
number++;
}
else
{
other++;
}
}
printf("The number of 'letter' is:%d\nThe number of 'space' is:%d\nThe number of 'number' is:%d\nThe number of 'other' is:%d\n",letter, space, number, other);
return 0;
}