+ 5
--> CHALLENGE <-- Binary
Write a program to get a number (even float and negative numbers!) in decimal, and return that in binary. If it was infinity, ask user the precision. for example: 10 --> 1010 -5 --> -101 2.5 --> 10.1 2.3 --> 10.01001... **All Languages**
7 Antworten
+ 3
+ 2
That's hard, especially with numbers that cannot be fully expressed as 1/2^n
+ 2
What is binary???
+ 2
a binary number is a number expressed in the base-2 numeral system or binary numeral system, which uses only two symbols: typically 0 and 1.
numbers like 110101 are binary numbers.
+ 1
https://code.sololearn.com/c1ZXvj2XT0jm/?ref=app
open on a computer to work correctly.