Interesting (character
*str)
{
Internationalorganizations (same as international organizations)
temp = 0;
while(*str)
{
temp * = 16;
if
(* str & lt= ' 9 ' & amp& amp* str & gt='0')
temp+= * str-' 0 ';
other
if
(* str & lt= ' f ' & amp& amp* str & gt='a ')
temp+= * str-' a '+ 10;
other
return
- 1;
str++;
}
return
Temperature;
}
I guess what you want is how to convert the decimal number of 16 into the decimal number of 10. The function above is.
If the parameters of the function do not meet the conversion requirements (there are abnormal characters), the function returns-1.
Here, I assume that you can write functions and know how to use them. . .