Wednesday, August 11, 2010

Produce 2 power n series using bitwise operator

I am printing 2n series up to 210

int main()
{
int i;
for(i=0;i<10;i++)
printf("%d\n",1<<i);

return 0;
}

This will be the output of the above code

1
2
4
8
16
32
64
128
256
512

2 comments:

From operating systems to multimedia, PC & mobile games to anti-virus, from drivers to registry cleaners and internet tools our website features all the latest soft wares for safe and free downloading enjoy.

dat wzz really a gud logic

Post a Comment