ROT13(g(2307534882734083072Y,1,0).pbz)

T

thor

private static void t(long a, int b, int c)
{
if ((a & 1) > 0)
{
System.out.print((char)('`' + c));
b = (((a >>=1) & 1) > 0) ? -b : b;
}
else if (a == 0) return;

t(a >> 1 , b, c + b );
}
 
D

Daniel Pitts

thor said:
private static void t(long a, int b, int c)
{
if ((a & 1) > 0)
{
System.out.print((char)('`' + c));
b = (((a >>=1) & 1) > 0) ? -b : b;
}
else if (a == 0) return;

t(a >> 1 , b, c + b );
}
And the point of that little exercise? BTW, tail recursion can be
replaced by a loop.
 
D

Daniel Pitts

Sébastien de Mapias said:
Yes, thats the same result I got, but I wanted to know the "point" of
it? As far as challenges go, it was lame. As far as advertisements go,
it was lame. As far as sites go ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top