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