输入一个英文字符用二进制输出ASCII码
和大家一起分享哦~~~~~~~~~#include <stdio.h>
void main()
{
char b,c,b1,b2,b3,b4,b5,b6,b7,b8;
printf("输入一个字符:");
b=getchar();
c=b;
b8=b%2;b=b/2;
b7=b%2;b=b/2;
b6=b%2;b=b/2;
b5=b%2;b=b/2;
b4=b%2;b=b/2;
b3=b%2;b=b/2;
b2=b%2;b=b/2;
b1=b%2;b=b/2;
b1=b%2;
printf("%c的二进制ASCII码是:%d%d%d%d%d%d%d%d\n",c,b1,b2,b3,b4,b5,b6,b7,b8);
}