C program to change octal to decimal

Posted By: Matpal - January 25, 2012
#include<stdio.h>

int main(){
   
    long int octalNumber;

    printf("Enter any octal number: ");
    scanf("%o",&octalNumber);

    printf("Equivalent decimal number is: %d",octalNumber);

    return 0;
}

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.