展开全部
ascill字母表:
a-z:97-122
A-Z:65-90
0-9:48-57
代码如下:可以循环判断是字母的ascil,输入636f707962616964757a686964616f313333376261340退出
#include
int main()
{
char hello;
printf("请输入字符,输入零退出\n");
while(1)
{
scanf("%c",&hello);
if((hello>=65)&&(hello<=90)||((hello>=97)&&(hello<=122)))
{
printf("%c的ascil为:%d\n",hello,hello);
}
if(hello=='0')
{
break;
}
}
}
运行结果如下:
请输入字符,输入零退出
f
f的ascil为:102
a
a的ascil为:97
c
c的ascil为:99
g
g的ascil为:103
A
A的ascil为:65
F
F的ascil为:70
C
C的ascil为:67
0
--------------------------------
Process exited after 14.81 seconds with return value 0
请按任意键继续. . .