为什么putchar(r+'0')
#include <stdio.h>void two(unsigned long n);
int main(void)
{
unsigned long n;
while((scanf("%d",&n))==1)
{
printf("two jinzhi:");
two(n);
putchar('\n');
}
putchar('done');
return 0;
}
void two(unsigned long n)
{
int r;
r=n%2;
if(n>=2)
two(n/2);
putchar(r+'0');
return;
}
为什么putcahr要这么編