- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
for (i = 0; i<sizeof(n)*4; i++)
{
if ((((n>>(2*i))&1==1)&&((n>>(2*i+1))&1==0)))
{
n|=(1<<(2*i));
n&=~(1<<(2*i+1));
}
else if ((((n>>(2*i))&1==0)&&((n>>(2*i+1))&1==1)))
{
n|=(1<<(2*i+1));
n&=~(1<<(2*i));
}
xaionaro 21.08.2009 14:52 # +1
Плюсану.