对0-64的数,二进制化
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c,d,e,f,j;
int h,i,k,m,g,n;
int tmp;
for(j=0;j<=64;j++)
{
a=j;
h=a%2;
b=a/2;
i=b%2;
c=b/2;
k=c%2;
d=c/2;
m=d%2;
e=d/2;
g=e%2;
f=e/2;
n=f%2;
printf("%d%d%d%d%d%d\n",h,i,k,m,g,n);
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发