Update DecimalToOctal.js

This commit is contained in:
Mohit Sharma
2017-08-20 00:44:39 +05:30
committed by GitHub
parent 9e1d8cfd3c
commit b9b58911aa

View File

@ -5,7 +5,7 @@ function decimalToOctal(num) {
oct=oct+(r*Math.pow(10,c++));
num =Math.floor(num/ 8); // basically /= 8 without remainder if any
}
console.log("The decimal in binary is " + oct);
console.log("The decimal in octal is " + oct);
}
decimalToOctal(2);