C program to change octal to decimal

Posted By: Matpal Media - 2:14 AM
#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.