code如下:
#include <stdio.h>
typedef unsigned char uint8_t;
int main()
{
uint8_t a[2] = {0x19,0x16};
int b,c;
b = a[0]/16*10 + a[0]%16;
c = a[1]/16*10 + a[1]%16;
printf("b = %d, c = %d \r\n",b,c);
return 0;
}
输入:
b = 19, c = 16
文章评论