为什么不能换?
void to_B (unsigned int num1); //声明 函数 to_B int main ( void ) //主函数
{
unsigned int a; //定义一个无符号的整型变量a
printf ("Input the number :");
while (1==scanf ("%u",&a)) 为什么这句不能换成 :: scanf("%u",&a);
{ whlie(1==a) ????
to_B (a); //调用to_B(a)函灵敏
putchar ('B'); //输出字符B
printf ("\nInput the number :");
}
return 0;
}
void to_B (unsigned int num1) //定义函数to_B
{
unsigned int x=0;
if (num1>0)
{
x=num1%2;
to_B(num1/2);
printf ("%u",x);
}
else
{ if (num1%2)
putchar('1');
else
putchar('0');
}
return ;
}