Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const input = ['236476736'];
- const print = this.print || console.log;
- const gets = this.gets || ((arr, index) => () => arr[index++])(input, 0);
- let decimal = gets();
- let binary = '';
- while (decimal > 0) {
- binary = (decimal % 2) + binary;
- decimal = Math.floor(decimal / 2);
- }
- print(binary);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement