标签:blog io ar for div log ef amp as
#include <stdio.h> #define TWO 2 int main(void){ int input_number=0; scanf("%d",&input_number); getchar(); int bitnum[32]={0}; for(int i=31,j=input_number;i>=0;i--){ bitnum[i]=j%TWO; j/=TWO; } printf("%d binary code is:",input_number); for(int i=0;i<=31;++i){ if(i==8||i==16||i==24) printf(" "); printf("%d", bitnum[i]); } printf("\n"); return 0; }
标签:blog io ar for div log ef amp as
原文地址:http://www.cnblogs.com/visionsmile/p/4164444.html