fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int A,i,j,count,date[100];
  5. count=0;
  6. scanf("%d",&A);
  7. while(A/2!=0)
  8. {
  9. count=count+1;
  10. i=A%2;
  11. A=A/2;
  12. date[count]=i;
  13. }
  14. printf("%d",A);
  15. for(j=count;j>0;j--)
  16. {
  17. printf("%d",date[j]);
  18. }
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 5320KB
stdin
64
stdout
1000000