用gets直到字符串结束,看看进行了几次。n=0;while(str=gets()){ i=-1; flag=1; while(i++ if(!ischar(str[i]))flag=0;//判断是否字母。 } if(flag)n++;}
潭浩强教材的例题,Page 115