仅供参考
#include
#include
#include
void binary(int n)
{
if(n/2>0)
{
binary(n/2);
}
printf("%d",n%2);
}
int main()
{
char a[80],b[80];int max,s1=0,i,j,n,d[81],k,s=0,c[81];
int q=1;
gets(a);k=strlen(a);
for(i=0;i
for(j=0;j
s=c[i]*q+s;
q=q*2;
}
q=1;
for(j=0;j
s1=d[j]*q+s1;
q=q*2;
}
max=s+s1;
binary(max);
return 0;
}