要从键盘上输入任意一个字符,然后输出该字符对应的 ASCII码。
#include <stdio.h>
int main()
{
char c;
scanf("%c",&c);
printf("The ASCII of character '%c' is ",c);
printf("%d.\n",c);
return 0;
}
要从键盘上输入任意一个字符,然后输出该字符对应的 ASCII码。
#include <stdio.h>
int main()
{
char c;
scanf("%c",&c);
printf("The ASCII of character '%c' is ",c);
printf("%d.\n",c);
return 0;
}