In this program, we are going to share a C++ program to convert binary to octal number. If you are a beginner and want to start learning the C programming, then keep your close attention in this tutorial as I am going to share a program for C++ program to convert binary to octal number.
To increase your C++ knowledge, practice all C++ programs:
Copy the below C++ program and execute it with the help of C++ compiler. At the end of this program, We have shared the output of this program.
long int binnum, rem, quot;
int octnum, i=1, j;
cout<<"Enter any binary number : ";
cout<<"Equivalent octal value of "<<binnum<<" :\n";
for(j=i-1; j>0; j--)
Enter any binary number : 11
Equivalent octal value of 11 = 13
Liked this program? Do Like & share with your friends.
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.