Decimal To Octal

i did not know how can i solve this question

@khemchandrs hey khem chand in this question you have to divide your no by 8 and and remainder for and result will multiple by 10
sum += rem*p;
here p is initially equal to 1 after that it is multiply by 10