Program to display hexadecimal, decimal and octal format of entered number

12:50 AM
#include
#include
void main()
{
int num;
clrscr();
printf("Enter the number : ");
scanf("%d",&num);
printf("\nDecimal format : %d",num);
printf("\nHexaDecimal format : %x",num);
printf("\nOctal format : %o",num);
getch();
}

0 Comments