#include<stdio.h>
main()
{
char ch;
printf("press a key and then press Enter:");
ch =getchar();
ch =ch-32;
printf("%c,%d\n",ch,ch); //分别输出变量ch中的字符及其ASCII码值
return 0;
}
main()
{
char ch;
printf("press a key and then press Enter:");
ch =getchar();
ch =ch-32;
printf("%c,%d\n",ch,ch); //分别输出变量ch中的字符及其ASCII码值
return 0;
}