#include<stdio.h>
main()
{
int number;
printf("enter number:");
scanf("%d",&number);
printf("Given number in Hexadecimal is %x",number); /*here format specifier %x is used to convert the
number into hexadecimal*/
printf("Given number in Octal is %o",number); /*here format specifier %x is used to convert the
number into Octal*/
}
The format specifiers %x,%o can also be used to read values
0 comments:
Post a Comment