Easy way
to convert decimal number to hexadecimal number.
#include<stdio.h>
int main(){
long int decimalNumber;
printf("Enter any decimal number: ");
scanf("%d",&decimalNumber);
printf("Equivalent hexadecimal number is:
%X",decimalNumber);
return 0;
}
Sample output:
Enter
any decimal number: 45
Equivalent
hexadecimal number is: 2D
No comments:
Post a Comment