Posts

Showing posts from March 30, 2020

Decimal to octal and hexadecimal ( Chapter 1 Program 6

Image
Also visit our YouTube Channel Tech Eos     VISIT CHANNEL /*    6. Write a program to accept an integer and display it  in octal and hexadecimal formats               */ #include<stdio.h> #include<conio.h> void main() { int number; clrscr(); printf("\nEnter an number : "); scanf("%d" , &number); printf("\n\nDecimal format is     %d" , number); printf("\nOctal format is       %o" , number); printf("\nHexadecimal format is %x" , number); getch(); }