从键盘输入一个字符,输出与该字符前后相邻的两个字符及对应的ASCII码,char ch; scanf(" %c",&ch); printf("%c %c\n",(char)(ch-1),
main()
{char t;
scanf("%c",&t);
printf("%d",t);
}
这样就好
#include
int main()
{
char ch;
ch=getchar();
printf("%d",ch);
return 0;
}
main()
{char t;
scanf("%c",&t);
printf("%d",t);
}