- 题目:任意输入一个数,输入你想转换成二进制,然后显示转换后的结果
int num = 45;
while (num != 0) {
// 取余
int result = num%2;
num = num/2;
printf("%d\n",result);
}
int num = 45;
while (num != 0) {
// 取余
int result = num%2;
num = num/2;
printf("%d\n",result);
}