fork(1) download
  1. #include <stdio.h>
  2. int tohex(int n)
  3. {
  4. if(n==0)
  5. return;
  6. else
  7. {
  8. tohex(n/16);
  9. printf("%d",n%16);
  10.  
  11. }
  12. }
  13.  
  14. int main(void) {
  15. int x;
  16. scanf("%d",&x);
  17. tohex(x);
  18.  
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0.01s 5316KB
stdin
160
stdout
100