how to display it from msb to lsb dont know about arrays or function
How to solve the problem
ok lets take 56 its octal will be 70 but my output is 07
can it be solved withou arrays
Yes @kartik-malik,
You must be printing the output in the reverse order.
So, you can use an array to store the digits and then print the result in the required order as done below:
Yes, you can also solve this without using the array as follows:
Let me know if you don’t understand something.
Hope, this would help.