十进制转换成2进制
#include "stdio.h"fun(int a)
{
int aa[20],i=0,r,s;
do{
r=a/2;
s=a%2;
aa[i]=s;
if(r!=0)
{
i++;
a=r;
}
}while(r);
for(;i>=0;i--)
printf("%d",aa[i]);
printf("\n");
}
main()
{
int n;
printf("Enter this numbber\n");
scanf("% d",&n);
fun(n);
}
错哪里了。得不出结果