Posts

Showing posts with the label hexadecimal

Dec 2 hex.

Image
if you wanted to convert a decimal number to a hexadecimal number, you can do it several ways. first you could do it the old fashion way by hand. or you could use a C language program such as: [code]   #include<stdio.h> int main(){     long int decimalNumber,remainder,quotient;     int i=1,j,temp;     char hexadecimalNumber[100];     printf("Enter any decimal number: ");     scanf("%ld",&decimalNumber);     quotient = decimalNumber;     while(quotient!=0){          temp = quotient % 16;       //To convert integer into character       if( temp < 10)            temp =temp + 48;       else          temp = temp + 55;     ...