fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int a,i=0,j;
  6. int data[32];
  7. scanf("%d",&a);
  8. while(a>0){
  9. data[i]=a%2;
  10. a=a/2;
  11. i++;}
  12. for(j=i-1;j>=0;j--)
  13. printf("%d",data[j]);
  14.  
  15.  
  16.  
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0.01s 5292KB
stdin
177
stdout
10110001