#include
using namespace std;
int main()
{
char a;
int i;
cout<<"请输入一个字符:";
cin>>a;
i=a;
cout< return 0;
}
其他部分就不写了,只写关键的
char c;
cin>>c;
cout<<(int)c<
void main()
{
char s;
cin>>s;
int c;
c=s;
cout<
void main()
{
char s;
cin>>s;
cout<<(int)s;
}