#include <stdio.h> int main() { char ch; scanf("%c",&ch); printf("%d",ch); return 0; }
直接用int格式输出就是ASCII码,真好。