+ 1

please Can anyone solve my problem i want to make simple Decimal to Binary Converter

Can anyone solve this? Please !

2nd Jul 2017, 4:56 PM
arbaz
arbaz - avatar
5 Respuestas
+ 3
In JS, just do: var decnum = 42 var binstr = decnum.toString(2); The parameter is the base to convert number, can be up to 36 ^^
2nd Jul 2017, 10:19 PM
visph
visph - avatar
0
Check this out . it might help u out https://code.sololearn.com/cH665GoLBySB/?ref=app
2nd Jul 2017, 5:03 PM
JULIAN ANTHONY
JULIAN ANTHONY - avatar
0
thanks!
2nd Jul 2017, 5:05 PM
arbaz
arbaz - avatar
0
goodluck brother with coding
2nd Jul 2017, 5:10 PM
JULIAN ANTHONY
JULIAN ANTHONY - avatar
0
@JULIAN ANTHONY again thanks to ans :-)
2nd Jul 2017, 5:11 PM
arbaz
arbaz - avatar