The program to convert a number from decimal to octal is discussed here. Given a decimal number as input, which has to be converted to its equivalent octal number.
For example, decimal number 200 has to be converted to octal.nn200 / 8 = 25 , rem = 0n25 / 8 = 3 , rem = 1n3 / 8 = 0 , rem = 3nnThe equivalent octal number of the decimal number 200 is 310.n
@@coding::1@@
Time complexity: O(n)
Recommended Programs