Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actualpapalazaru

Posted 16 October 2012 - 01:13 PM

something like this?

Not sure if the logic is correct.

y = 0;
t = 0;
while(x)
{
	y |= ((x&1) << t);
	t++;
	x >>= 2;
}

#4papalazaru

Posted 16 October 2012 - 01:12 PM

something like this?

Not sure if the logic is correct.

y = 0;
t = 0;
while(x)
{
	y |= ((x&1) << t);
	t++;
	x >> 2;
}

#3papalazaru

Posted 16 October 2012 - 01:12 PM

something like this?

Not sure if the logic is correct.

y = 0;
while(x)
{
	y |= ((x&1) << t);
	t++;
	x >> 2;
}

#2papalazaru

Posted 16 October 2012 - 01:11 PM

something like this?

Not sure if the logic is correct.

[source lang="cpp"]y = 0;while(x){    y |= ((x&1) << t);    t++;    x >> 2;}[/source]

#1papalazaru

Posted 16 October 2012 - 01:11 PM

something like this?

Not sure if the logic is correct.

[source lang="cpp"]y = 0;while(x){    y |= ((x&1) << t);    t++;    x >> 2;}[/source]

PARTNERS