So this is the code. And I expected it to work. It should let me enter input and then tell me the number of blanks, digits, letters and others. But it just giving input and its not giving me the output.
#include <stdio.h>
int main(void)
{
int blanks = 0, digits = 0, letters = 0, others = 0;
char c;
printf("Im working");
while ((c = scanf("%c", &c)) != EOF)
{
if (c == ' ')
++blanks;
else if (c >= '0' && c <= '9')
++digits;
else if (c >= 'a' && c <= 'z')
++letters;
else if (c >= 'A' && c <= 'Z')
++letters;
else
++others;
};
printf("blanks = %d, digits = %d, letters = %d, others = %d\n\n",
blanks, digits, letters, others);
return 0;
}