Skip to main content
Commonmark migration
Source Link

#C, 48 chars

C, 48 chars

i(n,b){n?i(n/b,b),putchar(n%b+48+(n%b>9)*39):0;}
  • input of 0 produces empty string

#C, 77 49 chars, prints 0 for zero

C, 77 49 chars, prints 0 for zero

I(n,b){putchar(n?i(n/b,b),48+n%b+(n%b>9)*39:48);}

To run, call i for first version, I for second.

#C, 48 chars

i(n,b){n?i(n/b,b),putchar(n%b+48+(n%b>9)*39):0;}
  • input of 0 produces empty string

#C, 77 49 chars, prints 0 for zero

I(n,b){putchar(n?i(n/b,b),48+n%b+(n%b>9)*39:48);}

To run, call i for first version, I for second.

C, 48 chars

i(n,b){n?i(n/b,b),putchar(n%b+48+(n%b>9)*39):0;}
  • input of 0 produces empty string

C, 77 49 chars, prints 0 for zero

I(n,b){putchar(n?i(n/b,b),48+n%b+(n%b>9)*39:48);}

To run, call i for first version, I for second.

;D
Source Link
Wug
  • 1.7k
  • 12
  • 12

#C, 48 chars

i(n,b){n?i(n/b,b),putchar(n%b+48+(n%b>9)*39):0;}
  • input of 0 produces empty string

#C, 7777 49 chars, prints 0 for zero

jI(n,b){putchar(n?ji(n/b,b),putchar(n%b+48+48+n%b+(n%b>9)*39):0;}I(n,b){n?j(n,b):putchar(48);}

To run, call i for first version, I for second.

#C, 48 chars

i(n,b){n?i(n/b,b),putchar(n%b+48+(n%b>9)*39):0;}
  • input of 0 produces empty string

#C, 77 chars, prints 0 for zero

j(n,b){n?j(n/b,b),putchar(n%b+48+(n%b>9)*39):0;}I(n,b){n?j(n,b):putchar(48);}

To run, call i for first version, I for second.

#C, 48 chars

i(n,b){n?i(n/b,b),putchar(n%b+48+(n%b>9)*39):0;}
  • input of 0 produces empty string

#C, 77 49 chars, prints 0 for zero

I(n,b){putchar(n?i(n/b,b),48+n%b+(n%b>9)*39:48);}

To run, call i for first version, I for second.

Source Link
Wug
  • 1.7k
  • 12
  • 12

#C, 48 chars

i(n,b){n?i(n/b,b),putchar(n%b+48+(n%b>9)*39):0;}
  • input of 0 produces empty string

#C, 77 chars, prints 0 for zero

j(n,b){n?j(n/b,b),putchar(n%b+48+(n%b>9)*39):0;}I(n,b){n?j(n,b):putchar(48);}

To run, call i for first version, I for second.