这样才对。
http://codepad.org/Ex6glKym
#include <stdio.h>
int main()
{
unsigned int N,temp;
unsigned char i;
for(N=0;N<65535;N++)
{
temp=N;
for(i=0;i<8;i++)
{
if((temp&0x00ff)==0x00ff)
{
printf("the number %d have 8 of 1 continue,HEX is %x.\n",N,N);
break;
}
temp=temp>>1;
}
}
return(0);
}
the number 255 have 8 of 1 continue,HEX is ff.
the number 510 have 8 of 1 continue,HEX is 1fe.
the number 511 have 8 of 1 continue,HEX is 1ff.
the number 767 have 8 of 1 continue,HEX is 2ff.
the number 1020 have 8 of 1 continue,HEX is 3fc.
the number 1021 have 8 of 1 continue,HEX is 3fd.
the number 1022 have 8 of 1 continue,HEX is 3fe.
the number 1023 have 8 of 1 continue,HEX is 3ff.
the number 1279 have 8 of 1 continue,HEX is 4ff.
the number 1534 have 8 of 1 continue,HEX is 5fe.
the number 1535 have 8 of 1 continue,HEX is 5ff.
the number 1791 have 8 of 1 continue,HEX is 6ff.
the number 2040 have 8 of 1 continue,HEX is 7f8.
the number 2041 have 8 of 1 continue,HEX is 7f9.
the number 2042 have 8 of 1 continue,HEX is 7fa.
the number 2043 have 8 of 1 continue,HEX is 7fb.
the number 2044 have 8 of 1 continue,HEX is 7fc.
the number 2045 have 8 of 1 continue,HEX is 7fd.
the number 2046 have 8 of 1 continue,HEX is 7fe.
the number 2047 have 8 of 1 continue,HEX is 7ff.
the number 2303 have 8 of 1 continue,HEX is 8ff.
the number 2558 have 8 of 1 continue,HEX is 9fe.
the number 2559 have 8 of 1 continue,HEX is 9ff.
the number 2815 have 8 of 1 continue,HEX is aff.
the number 3068 have 8 of 1 continue,HEX is bfc.
the number 3069 have 8 of 1 continue,HEX is bfd.
the number 3070 have 8 of 1 continue,HEX is bfe.
the number 3071 have 8 of 1 continue,HEX is bff.
the number 3327 have 8 of 1 continue,HEX is cff.
the number 3582 have 8 of 1 continue,HEX is dfe.
the number 3583 have 8 of 1 continue,HEX is dff.
the number 3839 have 8 of 1 continue,HEX is eff.
the number 4080 have 8 of 1 continue,HEX is ff0.
the number 4081 have 8 of 1 continue,HEX is ff1.
the number 4082 have 8 of 1 continue,HEX is ff2.
the number 4083 have 8 of 1 continue,HEX is ff3.
the number 4084 have 8 of 1 continue,HEX is ff4.
the number 4085 have 8 of 1 continue,HEX is ff5.
the number 4086 have 8 of 1 continue,HEX is ff6.
the number 4087 have 8 of 1 continue,HEX is ff7.
the number 4088 have 8 of 1 continue,HEX is ff8.
the number 4089 have 8 of 1 continue,HEX is ff9.
the number 4090 have 8 of 1 continue,HEX is ffa.
the number 4091 have 8 of 1 continue,HEX is ffb.
the number 4092 have 8 of 1 continue,HEX is ffc.
the number 4093 have 8 of 1 continue,HEX is ffd.
the number 4094 have 8 of 1 continue,HEX is ffe.
the number 4095 have 8 of 1 continue,HEX is fff.
the number 4351 have 8 of 1 continue,HEX is 10ff.
the number 4606 have 8 of 1 continue,HEX is 11fe.
the number 4607 have 8 of 1 continue,HEX is 11ff.
the number 4863 have 8 of 1 continue,HEX is 12ff.
the number 5116 have 8 of 1 continue,HEX is 13fc.
the number 5117 have 8 of 1 continue,HEX is 13fd.
the number 5118 have 8 of 1 continue,HEX is 13fe.
the number 5119 have 8 of 1 continue,HEX is 13ff.
the number 5375 have 8 of 1 continue,HEX is 14ff.
the number 5630 have 8 of 1 continue,HEX is 15fe.
the number 5631 have 8 of 1 continue,HEX is 15ff.
the number 5887 have 8 of 1 continue,HEX is 16ff.
the number 6136 have 8 of 1 continue,HEX is 17f8.
the number 6137 have 8 of 1 continue,HEX is 17f9.
the number 6138 have 8 of 1 continue,HEX is 17fa.
the number 6139 have 8 of 1 continue,HEX is 17fb.
the number 6140 have 8 of 1 continue,HEX is 17fc.
the number 6141 have 8 of 1 continue,HEX is 17fd.
the number 6142 have 8 of 1 continue,HEX is 17fe.
the number 6143 have 8 of 1 continue,HEX is 17ff.
the number 6399 have 8 of 1 continue,HEX is 18ff.
the number 6654 have 8 of 1 continue,HEX is 19fe.
the number 6655 have 8 of 1 continue,HEX is 19ff.
the number 6911 have 8 of 1 continue,HEX is 1aff.
the number 7164 have 8 of 1 continue,HEX is 1bfc.
the number 7165 have 8 of 1 continue,HEX is 1bfd.
the number 7166 have 8 of 1 continue,HEX is 1bfe.
the number 7167 have 8 of 1 continue,HEX is 1bff.
the number 7423 have 8 of 1 continue,HEX is 1cff.
the number 7678 have 8 of 1 continue,HEX is 1dfe.
the number 7679 have 8 of 1 continue,HEX is 1dff.
the number 7935 have 8 of 1 continue,HEX is 1eff.
the number 8160 have 8 of 1 continue,HEX is 1fe0.
the number 8161 have 8 of 1 continue,HEX is 1fe1.
the number 8162 have 8 of 1 continue,HEX is 1fe2.
the number 8163 have 8 of 1 continue,HEX is 1fe3.
the number 8164 have 8 of 1 continue,HEX is 1fe4.
the number 8165 have 8 of 1 continue,HEX is 1fe5.
the number 8166 have 8 of 1 continue,HEX is 1fe6.
the number 8167 have 8 of 1 continue,HEX is 1fe7.
the number 8168 have 8 of 1 continue,HEX is 1fe8.
the number 8169 have 8 of 1 continue,HEX is 1fe9.
the number 8170 have 8 of 1 continue,HEX is 1fea.
the number 8171 have 8 of 1 continue,HEX is 1feb.
the number 8172 have 8 of 1 continue,HEX is 1fec.
the number 8173 have 8 of 1 continue,HEX is 1fed.
the number 8174 have 8 of 1 continue,HEX is 1fee.
the number 8175 have 8 of 1 continue,HEX is 1fef.
the number 8176 have 8 of 1 continue,HEX is 1ff0.
the number 8177 have 8 of 1 continue,HEX is 1ff1.
the number 8178 have 8 of 1 continue,HEX is 1ff2.
the number 8179 have 8 of 1 continue,HEX is 1ff3.
the number 8180 have 8 of 1 continue,HEX is 1ff4.
the number 8181 have 8 of 1 continue,HEX is 1ff5.
the number 8182 have 8 of 1 continue,HEX is 1ff6.
the number 8183 have 8 of 1 continue,HEX is 1ff7.
the number 8184 have 8 of 1 continue,HEX is 1ff8.
the number 8185 have 8 of 1 continue,HEX is 1ff9.
the number 8186 have 8 of 1 continue,HEX is 1ffa.
the number 8187 have 8 of 1 continue,HEX is 1ffb.
the number 8188 have 8 of 1 continue,HEX is 1ffc.
the number 8189 have 8 of 1 continue,HEX is 1ffd.
the number 8190 have 8 of 1 continue,HEX is 1ffe.
the number 8191 have 8 of 1 continue,HEX is 1fff.
the number 8447 have 8 of 1 continue,HEX is 20ff.
the number 8702 have 8 of 1 continue,HEX is 21fe.
the number 8703 have 8 of 1 continue,HEX is 21ff.
the number 8959 have 8 of 1 continue,HEX is 22ff.
the number 9212 have 8 of 1 continue,HEX is 23fc.
the number 9213 have 8 of 1 continue,HEX is 23fd.
the number 9214 have 8 of 1 continue,HEX is 23fe.
the number 9215 have 8 of 1 continue,HEX is 23ff.
the number 9471 have 8 of 1 continue,HEX is 24ff.
the number 9726 have 8 of 1 continue,HEX is 25fe.
the number 9727 have 8 of 1 continue,HEX is 25ff.
the number 9983 have 8 of 1 continue,HEX is 26ff.
the number 10232 have 8 of 1 continue,HEX is 27f8.
the number 10233 have 8 of 1 continue,HEX is 27f9.
the number 10234 have 8 of 1 continue,HEX is 27fa.
the number 10235 have 8 of 1 continue,HEX is 27fb.
the number 10236 have 8 of 1 continue,HEX is 27fc.
the number 10237 have 8 of 1 continue,HEX is 27fd.
the number 10238 have 8 of 1 continue,HEX is 27fe.
the number 10239 have 8 of 1 continue,HEX is 27ff.
the number 10495 have 8 of 1 continue,HEX is 28ff.
the number 10750 have 8 of 1 continue,HEX is 29fe.
the number 10751 have 8 of 1 continue,HEX is 29ff.
the number 11007 have 8 of 1 continue,HEX is 2aff.
the number 11260 have 8 of 1 continue,HEX is 2bfc.
the number 11261 have 8 of 1 continue,HEX is 2bfd.
the number 11262 have 8 of 1 continue,HEX is 2bfe.
the number 11263 have 8 of 1 continue,HEX is 2bff.
the number 11519 have 8 of 1 continue,HEX is 2cff.
the number 11774 have 8 of 1 continue,HEX is 2dfe.
the number 11775 have 8 of 1 continue,HEX is 2dff.
the number 12031 have 8 of 1 continue,HEX is 2eff.
the number 12272 have 8 of 1 continue,HEX is 2ff0.
the number 12273 have 8 of 1 continue,HEX is 2ff1.
the number 12274 have 8 of 1 continue,HEX is 2ff2.
the number 12275 have 8 of 1 continue,HEX is 2ff3.
the number 12276 have 8 of 1 continue,HEX is 2ff4.
the number 12277 have 8 of 1 continue,HEX is 2ff5.
the number 12278 have 8 of 1 continue,HEX is 2ff6.
the number 12279 have 8 of 1 continue,HEX is 2ff7.
the number 12280 have 8 of 1 continue,HEX is 2ff8.
the number 12281 have 8 of 1 continue,HEX is 2ff9.
the number 12282 have 8 of 1 continue,HEX is 2ffa.
the number 12283 have 8 of 1 continue,HEX is 2ffb.
the number 12284 have 8 of 1 continue,HEX is 2ffc.
the number 12285 have 8 of 1 continue,HEX is 2ffd.
the number 12286 have 8 of 1 continue,HEX is 2ffe.
the number 12287 have 8 of 1 continue,HEX is 2fff.
the number 12543 have 8 of 1 continue,HEX is 30ff.
the number 12798 have 8 of 1 continue,HEX is 31fe.
the number 12799 have 8 of 1 continue,HEX is 31ff.
the number 13055 have 8 of 1 continue,HEX is 32ff.
the number 13308 have 8 of 1 continue,HEX is 33fc.
the number 13309 have 8 of 1 continue,HEX is 33fd.
the number 13310 have 8 of 1 continue,HEX is 33fe.
the number 13311 have 8 of 1 continue,HEX is 33ff.
the number 13567 have 8 of 1 continue,HEX is 34ff.
the number 13822 have 8 of 1 continue,HEX is 35fe.
the number 13823 have 8 of 1 continue,HEX is 35ff.
the number 14079 have 8 of 1 continue,HEX is 36ff.
the number 14328 have 8 of 1 continue,HEX is 37f8.
the number 14329 have 8 of 1 continue,HEX is 37f9.
the number 14330 have 8 of 1 continue,HEX is 37fa.
the number 14331 have 8 of 1 continue,HEX is 37fb.
the number 14332 have 8 of 1 continue,HEX is 37fc.
the number 14333 have 8 of 1 continue,HEX is 37fd.
the number 14334 have 8 of 1 continue,HEX is 37fe.
the number 14335 have 8 of 1 continue,HEX is 37ff.
the number 14591 have 8 of 1 continue,HEX is 38ff.
the number 14846 have 8 of 1 continue,HEX is 39fe.
the number 14847 have 8 of 1 continue,HEX is 39ff.
the number 15103 have 8 of 1 continue,HEX is 3aff.
the number 15356 have 8 of 1 continue,HEX is 3bfc.
the number 15357 have 8 of 1 continue,HEX is 3bfd.
the number 15358 have 8 of 1 continue,HEX is 3bfe.
the number 15359 have 8 of 1 continue,HEX is 3bff.
the number 15615 have 8 of 1 continue,HEX is 3cff.
the number 15870 have 8 of 1 continue,HEX is 3dfe.
the number 15871 have 8 of 1 continue,HEX is 3dff.
the number 16127 have 8 of 1 continue,HEX is 3eff.
the number 16320 have 8 of 1 continue,HEX is 3fc0.
the number 16321 have 8 of 1 continue,HEX is 3fc1.
the number 16322 have 8 of 1 continue,HEX is 3fc2.
the number 16323 have 8 of 1 continue,HEX is 3fc3.
the number 16324 have 8 of 1 continue,HEX is 3fc4.
the number 16325 have 8 of 1 continue,HEX is 3fc5.
the number 16326 have 8 of 1 continue,HEX is 3fc6.
the number 16327 have 8 of 1 continue,HEX is 3fc7.
the number 16328 have 8 of 1 continue,HEX is 3fc8.
the number 16329 have 8 of 1 continue,HEX is 3fc9.
the number 16330 have 8 of 1 continue,HEX is 3fca.
the number 16331 have 8 of 1 continue,HEX is 3fcb.
the number 16332 have 8 of 1 continue,HEX is 3fcc.
the number 16333 have 8 of 1 continue,HEX is 3fcd.
the number 16334 have 8 of 1 continue,HEX is 3fce.
the number 16335 have 8 of 1 continue,HEX is 3fcf.
the number 16336 have 8 of 1 continue,HEX is 3fd0.
the number 16337 have 8 of 1 continue,HEX is 3fd1.
the number 16338 have 8 of 1 continue,HEX is 3fd2.
the number 16339 have 8 of 1 continue,HEX is 3fd3.
the number 16340 have 8 of 1 continue,HEX is 3fd4.
the number 16341 have 8 of 1 continue,HEX is 3fd5.
the number 16342 have 8 of 1 continue,HEX is 3fd6.
the number 16343 have 8 of 1 continue,HEX is 3fd7.
the number 16344 have 8 of 1 continue,HEX is 3fd8.
the number 16345 have 8 of 1 continue,HEX is 3fd9. |