输入一个字符,按格式输出这个字符及它的ASCII码 |
||
Sample Input |
||
A |
||
Sample Output |
||
The ASCII of 'A' is 65. |
#include<stdio.h>
int main()
{
char c;
scanf("%c",&c);
printf("The ASCII of '%c' is %d.",c,c);
return 0;
}
输入一个字符,按格式输出这个字符及它的ASCII码 |
||
Sample Input |
||
A |
||
Sample Output |
||
The ASCII of 'A' is 65. |
#include<stdio.h>
int main()
{
char c;
scanf("%c",&c);
printf("The ASCII of '%c' is %d.",c,c);
return 0;
}