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. if(n%16<=9)
  10. printf("%d",n%16);
  11.  
  12. }
  13. }
  14.  
  15. int main(void) {
  16. int x;
  17. scanf("%d",&x);
  18. tohex(x);
  19.  
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0.01s 5324KB
stdin
10
stdout
Standard output is empty