=0){ t=x%10; while(x!=0){ x=x/10 ; b=x%10; " />
Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Input an integer, split it bit by bit starting from the high bit and output its digits?
Input an integer, split it bit by bit starting from the high bit and output its digits?

#include

int main(void)

{

int b,t,x,c;

printf("Input an integer: ");

scanf("%d",&x);

c=0;

< p> if(x>=0){

t=x%10;

while(x!=0){

x=x/10 ;

b=x%10;

t=t*1b;

}

t=t/10;

while(t!=0){

printf("%d ",t%10);

t=t/10;

}

}

if(x<0){

x=-x;

t=x% 10;

while(x!=0){

x=x/10;

b=x%10;

t=t*1b;

}

t=t/10;

while(t!=0){

c++;

if(c<=1)

printf("- ");

else printf(" ");

< p> printf("%d",t%10);

t=t/10;

}

}

return 0;

}

Comrade, are we the ones who went to college?

Study hard and think for yourself.