int main(void)
{
int x, a[16], i = 0, k, y;
scanf_s("%d",&x);
y = x;
while (y != 0)
{
a[i] = y % 2;
y = y / 2;
i++;
}
printf("%d = ",x);
for (k = i - 1; k >= 0; k--)
printf("%1d",a[k]);
printf("\n");
getchar();
getchar();
return 0;
}
while循环过后为什么i=5?
当x=y=26