我打算做这样的程序:如何为十六进制数转换为ASCII使用C
loop
read first character
read second character
make a two-digit hexadecimal number from the two characters
convert the hexadecimal number into decimal
display the ascii character corresponding to that number.
end loop
我遇到的两个字符变成一个十六进制数,然后打开该成问题十进制数。一旦我有一个十进制数,我可以显示ascii字符。
上面的代码在只有一个数字的情况下工作。如何改变它以处理两位十六进制数的第一个数字? – 2011-02-23 09:15:07
@ Z缓冲区:在大多数情况下,您只需重复尽可能多的数字。 – 2011-02-23 15:27:09
如果删除了16 *值,那么这将起作用,然后他的结果乘以16^n,其中n是数字的位置。 – 2011-02-24 08:07:25