// 函数用于将十进制数转换为指定进制数void decimalToAny(int n, int r) { if (n == 0) { return; } decimalToAny(n / r, r); int remainder = n % r; if (remainder < 10) { printf("%d", remainder); } else { printf("%c", 'A' + remainder - 10); }}