Skip to main content
deleted 29 characters in body
Source Link
user96495
user96495

Io, 114 bytes

Suffers from the existanceWhile you all are enjoying rounding built-ins in your language, Io doesn't have any of prepended 0sthose convenient rounding built-ins. Is that allowed here? Edit: Fixed it anyway..

method(x,I :=((((x-31)/16)exp*100)round asString);I=if(I size<3,"0","").. I;I asMutable atInsertSeq(I size-2,"."))

Try it online!

Io, 114 bytes

Suffers from the existance of prepended 0s. Is that allowed here? Edit: Fixed it anyway.

method(x,I :=((((x-31)/16)exp*100)round asString);I=if(I size<3,"0","").. I;I asMutable atInsertSeq(I size-2,"."))

Try it online!

Io, 114 bytes

While you all are enjoying rounding built-ins in your language, Io doesn't have any of those convenient rounding built-ins...

method(x,I :=((((x-31)/16)exp*100)round asString);I=if(I size<3,"0","").. I;I asMutable atInsertSeq(I size-2,"."))

Try it online!

Source Link
user96495
user96495

Io, 114 bytes

Suffers from the existance of prepended 0s. Is that allowed here? Edit: Fixed it anyway.

method(x,I :=((((x-31)/16)exp*100)round asString);I=if(I size<3,"0","").. I;I asMutable atInsertSeq(I size-2,"."))

Try it online!