fork(1) download
  1. #include <stdio.h>
  2.  
  3. char buf[65] = {0};
  4. int base;
  5.  
  6. char *main (int x, int y, char* s){
  7. return y && scanf("%d %d", &base, &x, printf("Enter base and number: ")) && main(x, 0, buf) && puts(buf)
  8. ? 0 : x && (s = main(x / base, 0, s)) && (y[s] += 10 > (y[s] = x % base) ? '0' : -10 - (-'A'))
  9. ? &1[s] : (x[s] = '0', &x[s + 1]);
  10. }
Success #stdin #stdout 0s 4528KB
stdin
16 32767
stdout
Enter base and number: 07FFF