conversion of decimal value of latitude and longitude to hex value

Status
Not open for further replies.

ilapuppu

Newbie level 4
Joined
Jan 30, 2015
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
76
can anyone tell how to convert a decimal latitude,longitude points into hexadecimal value for interfacing purpose

reply me as soon as possible

thanks in advance
 

**broken link removed**

Code:
int main()

{

    long decimalnum, remainder, quotient;

    int i = 1, j, temp;

    char hexadecimalnum[100];

 

    printf("Enter decimal number: ");

    scanf("%ld", &decimalnum);

 

    quotient = decimalnum;

 

    while (quotient != 0)

    {

        temp = quotient % 16;

        // To convert integer into character

        if (temp  0; j--)

            printf("%c", hexadecimalnum[j]);

    return 0;

}
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…