Desarrollar un programa que lea un número entero positivo en el sistema decimal y lo convierta a binario y hexadecimal.
Script function toBin(decNum) { return parseInt(decNum, 10).toString(2) } function toHex(decNum) { return parseInt(decNum, 10).toString(16) } function toHex(decNum) { return decNum.toString(16) } function toBin(decNum) { return decNum.toString(2) } //Test toBin(2) toHex(2)