Question:Easy way to convert decimal number to octal number in c 

Answer 
#include<stdio.h>
int main(){

  long int decimalNumber;

  printf("Enter any decimal number : ");
  scanf("%d",&decimalNumber);

  printf("Equivalent octal number is: %o",decimalNumber);

  return 0;
}
Sample output: Enter any decimal number: 25 Equivalent octal number is: 31 

+ Report
Total Preview: 446
Easy way to convert decimal number to octal number in c
Copyright © 2024. Powered by Intellect Software Ltd