//ASCII字符转数字
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
char ch;
printf("Please enter a character.\n");
scanf("%c",&ch);
printf("The code for %c is %d .\n",ch,ch);
system("pause");
return 0;
}
//数字转字符
#include<stdio.h>
#include<stdlib.h>
int main()
{
char ch;
printf("Please enter a character.\n");
scanf("%d",&ch);
printf("%d is %c\n",ch,ch);
system("pause");
return 0;
}