进制转换以及打印方法
void convertnumber(void) {
do {
convertednumber[digit] = numbertoconvert % base;
digit++;
numbertoconvert /= base;
} while (numbertoconvert != 0);
void displayconvertednumber(void) {
const char basedigits[16] = { '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F' };
int nextdigit;
printf("converted number=");
for (--digit; digit >= 0; digit--) {
nextdigit = convertednumber[digit];
printf("%c", basedigits[nextdigit]);
}
printf("\n");
}