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