#include
main()
{
char ch;
printf("Please input the char:\n");
scanf("%c",&ch);
printf("%d\n",ch - '0');
getch();
}
#include
int main()
{
char a;
printf("请输入数值:\n");
scanf("%c",&a);
if((a<='0')&&(a>='9'))
a=a-'0';
printf("a=%d\n",a-'0');
return 0;
}
没有错!有什么问题?