#include<stdio.h>
#include<conio.h>
#include<conio.h>
#include<string.h>
void main ()
{
char *st;
int i,n,l;
clrscr();
void main ()
{
char *st;
int i,n,l;
clrscr();
st=(char *)malloc(sizeof(char)*100);
printf ("Enter any octal number: ");
printf ("Enter any octal number: ");
scanf("%s",st);
n=0;
l=strlen(st);
for(i=0; i<1; i++)
l=strlen(st);
for(i=0; i<1; i++)
n=n*8+*(st+i)-48;
printf("Eqivalent decimal numberis: %ld",n);
getch ();
}
No comments:
Post a Comment