#include<stdio.h>
#include<conio.h>
void main()
{
int n,a=0,i=1;
clrscr();
printf("Enter any octal number : ");
scanf("%d",&n);
while(n/10!=0)
{
a=a+i*(n%10);
n=n/10;
i=i*8;
}
a=a+i*(n%10);
printf("Equivalent decimal number is :");
printf("%d",a);
getch();
}
///////////////////////////////////////////////////////////////////////////
Copy & paste this code in your TC & run, then you will get output.......
If you have any problem please comment below.........