#includevoidmain(){intx,a[32],i=0;printf("请输入一个十进制整数.\n");scanf("%d",&x);while(x!=0){a[i++]=x%2;x=x/2;}for(i--;i>=0;i--)printf("%d",a[i]);printf("\n");}