Created
November 13, 2021 18:27
-
-
Save jadsongmatos/97397cee9e1d4c4227db2f62b96b63b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 57.23 dec | |
r = "" | |
a = 0.23 | |
b = 0; | |
for (let index = 0; index < 52; index++) { | |
b = a * 2 | |
console.log(b) | |
if(b > 1){ | |
a = b - 1; | |
r = r + "1" | |
} else { | |
a = b; | |
r = r + "0" | |
} | |
} | |
console.log(r) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment