Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - The complete binary form of 130
The complete binary form of 130
I also sent a homemade one, which has been verified.

# include & ltstdio.h & gt

Master ()

{

char binOut[ 17];

short int i,j; /* 16 bit integer, short integer */

scanf("%d ",& ampI);

for(j = 15; j & gt=0; j -)

{

If (I&(1<; & ltj))

binOut[ 15-j]= ' 1 ';

other

binOut[ 15-j]= ' 0 ';

}

binOut[ 16]= 0;

printf("DEC(%d)=BIN(%s)\n ",I,binOut);

}