运行之后跟我预期的不一样
#include<stdio.h>int main(void)
{
char ch;
int ch_num=0,dig_num=0,oth_num=0;
printf("Enter a string:"); /*scanf("%c",ch);这句话不用*/
ch=getchar();
do
{
if((ch>='A')&&(ch<='Z')||(ch>='a')&&(ch<='z'))
ch_num++;
else
if((ch>='0')&&(ch<='9'))
dig_num++;
else
oth_num++;
}while(ch=getchar()!='\n');
printf("%4d%4d%4d\n",ch_num,dig_num,oth_num);
return(0);
}