Decimal to binary

how to do this question

hey @anmolsr755 like decimal is numbers written in base 10 and binary are numbers written in base 2, similarly octals are numbers written in base 8.Approach to solve this question is really easy:

Store the remainder when the number is divided by 8 in an array.
Divide the number by 8 now
Repeat the above two steps until the number is not equal to 0.
Print the array in reverse order now.