#include <stdio.h>
void main() {
int num, radix, i = 0;
char res[32] = {'0'}, table[] = "0123456789ABCDEF";
printf("Please enter the value to be converted:");
scanf("%d", &num);
printf("Please enter the radix to be converted:");
scanf("%d", &radix);
if (num == 0)
i = 1;
while (num > 0) {
res[i++] = table[num % radix];
num = num / radix;
}
printf("Result:");
while (--i >= 0)
printf("%c", res[i]);
}
소수 (2,147,483,647 0) (16 진수 2 진수) 이진 차례.
추천
출처blog.csdn.net/qq_38490457/article/details/104739322
추천
행