Function to convert decimal value to equivalent octal value
int Octal ( int decimal ) { int octal = 0 ; string temp = " " ; while ( decimal > 0 ) { int remainder = decimal % 8 ; temp = to_string ( remainder ) + temp ; decimal /= 8 ; } for ( int i = 0 ; i < temp . length ( ) ; i ++ ) octal = ( octal * 10 ) + ( temp [ i ] - '0' ) ; return octal ; }