#include
#define MAX (sizeof(int)*8)
int main()
{
int a[MAX];
int num;
int i;
int sign=1;
printf("please input the number:");
scanf("%d",&num);
if(num<0)
{
num=~num+1;
sign=-1;
}
if(sign==1)
a[0]=0;
else
a[0]=1;
for(i=MAX-1;i>0;i--)
{
a[i]=num & 1;
num=num>>1;
}
for(i=0;i
printf("%d",a[i]);
}
putchar('\n');
return 0;
}