#include "stdafx.h"
#include<ctype.h>
int _tmain(int argc, _TCHAR* argv[])
{
char ch,ch1;
while(1)
{
printf("input the character('q' to qiut):");
ch=getchar();
ch1=getchar();
if(ch=='q'||ch=='Q')
break;
if(isalpha(ch))
printf("\n%c is a letter.\n\n",ch);
else
printf("\n%c is a not letter.\n\n",ch);
}
return 0;
}
数字 1 也被检测为字母,求指导 。