统计字符为什么结束不了


#include
int main()
{char c;
int letter,num,blank,others;
c=getchar();
while(c!=EOF){
    if((c>='a'&&c<='z')||(c>='A'&&c<='Z')){
        letter++;
    }
    else if(c>='0'&&c<='9'){
        num++;
    }
    else if(c==' '){
        blank++;
    }
    else{
        others++;
    }
c=getchar();
}
printf("%d%d%d%d",letter,num,blank,others);
}

你是想要回车结束吗?