Program To Convert Decimal Number To Octal Equivalent:
#include<iostream>
using namespace std;
main()
{
int num,octal[50],i=0;
cout<<"\nEnter Any Decimal Number ";
cin>>num;
while(num>0)
{
octal[i]=num%8;
num=num/8;
i++;
}
cout<<"\nOctal Equivalent is ";
for(int j=i-1;j>=0;j--)
cout<<octal[j];
}