Please click on 1-2 Ads to keep this website's Study Material FREE and regularly Updated.

Program 27: Write a C++ program to convert octal number to decimal number.

using namespace std;

int main()
	int num,sum=0,j=0;
	cout<<"\nenter an octal number using digits(0-7) : ";

	for(int i=num;i>0;i=i/10)

	cout<<"\nafter conversion : \n\t\t< "<<num<<" >  =  < "<<sum<<" >";
	return 0;

If you have any suggestion or found any error in the above program, then do let us know at [email protected] or just comment below.