#include"stdio.h"
#define N 32
#define M 1<<(N-1)
void print(unsigned c)
{
int i;
for (i=0;i{
if(i%8==0)printf(" ");
putchar(((c&M)==0)?'0':'1');
c<<=1;
}
printf("\n");
}
int main()
{
unsigned d;
start:scanf("%u",&d);
printf("%u的二进制为:",d);
print(d);
goto start;
return 0;
}
阅读(3283) | 评论(1) | 转发(0) |