Hi I want to write a program which reads a hexadecimal number and returns an decimal number.
I wrote that code(inspired by some code pieces from web):
#include <stdio.h>
int main()
{
int hexa;
scanf("%x", &hexa);
printf("%d", hexa);
return 0;
}
but it does't give the answer I want
I want to get 16 for 10000000 or 1109651713 for 01F12342 .
Could you please help me with that?
Thanks
--
newbiecoder