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