编写程序实现:将BCD码1100101,转换为十六进制数0x65

2024-11-18 17:30:32
推荐回答(1个)
回答1:

unsigned char bin2bcd(usigned val)
{
return ((val/10)<<4)+val%10;
}