0

How to write a program to convert a binary no to a decimal no.

program

20th Aug 2017, 4:46 PM
Amrendra Kumar
Amrendra Kumar - avatar
2 Réponses
+ 1
Integer.parseInt(integerAsString, radix) where the integerAsString would be something like: "1010" and the radix would be 2 to indicate binary. So the output will be 10.
20th Aug 2017, 5:08 PM
ChaoticDawg
ChaoticDawg - avatar
0
Maybe something like this? Please read the comment for instructions. https://code.sololearn.com/cmySYgxy5Bkl/?ref=app
20th Aug 2017, 6:49 PM
Jonas Schröter
Jonas Schröter - avatar