Problem with Simple C Program
I need help here.
This is my simple C Code
main( ) {
int let, dig, other, c;
let = dig = other = 0;
while ((c=getchar( )) != '\0')
if( ('A'<=c && c<='Z') || ('a'<=c && c<='z') )
++let;
else if( '0'<=c && c<='9' ) ++dig;
else ++other;
printf("%d letters, %d digits, %d others\n", let, dig, other);
}
The problem I am having is ocne it is compiled, I execute it, and then I type in something and hit enter.
I know it goes through the loop but for some reason the printf never runs and it just keeps prompting me for input.
I am using the gcc gnu compiler.
Thanks in advance