+ 7
[CHALLENGE ] base 10 to binary converter
create a code that converts any base to binary. or vise-versa, mine is base 10 to binary... happy challenge. .. my mentor in c++ is Jamie. :) hope to see her code here https://code.sololearn.com/cVga5Y4C3W79/?ref=app
11 Respuestas
+ 9
Base Converter:
Any base (2-64) to any other (2-64)
Accepts negative and floats as input
https://code.sololearn.com/cYcOQFySB6C9/#py
+ 5
Hey! Mine converts from decimal to any other lower base ;)
https://code.sololearn.com/cvcQOULA28iv/?ref=app
(yes, I know, no unary support yet)
+ 4
Is this cheating? :P
Javascript:
const f=x=>(x>>>0).toString(2);
f(1); // 1
f(-1); // 11111111111111111111111111111111 f(256); // 100000000
+ 3
@splitty Dev. I don't understand, I copied and paste to js code playground it made no sense please create a code , my be I'll understand you, I want to see the simplest way to do this, :-) :-) :-)
+ 3
@Edgar Garrido , nice code
+ 3
@swin, nice one
+ 2
@Kuba ,, nice :-)
+ 2
Splitty Dev, nice code
+ 1
Here's my submit I made quite a while ago for pretty much the same challenge:
https://code.sololearn.com/cmPzpa1CAH9O/?ref=app
Like I said in my post to said challenge, the logic of the code is up to line 28, everything else there is just showing off.