4.2计算字符的ASCII碼

Q:终端输入一个字符,输出ASCII碼

#include<stdio.h>
int main()
{
	char c;
	printf("input a charscter:");
	scanf("%c",&c);
	getchar();
	printf("the ASCII of %c is %d
",c,c);
	return 0;
}

  

拥抱明天! 不给自己做枷锁去限制自己。 别让时代的悲哀,成为你人生的悲哀。
原文地址:https://www.cnblogs.com/dd2hm/p/6749543.html