Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Tail Recursion

Name: Anonymous 2011-10-19 21:09

How do i make this function tail recursive in java


public int fib(int n)
{
  return( n <= 1 ? n : fib(n-1) + fib(n-2) );
}

Name: Anonymous 2011-10-20 14:11

>>29
I said C, not ANSI C, that means, I didn't specify anything, neither ANSI C, nor GNU C.
What is your point? If you don't refer to a specific standard compiler dependent cruft is nonsensical as you don't have any standards to define what is an extension or not.

The program in >>11 is GNU-C, it's certainly not ANSI-C, and if you use C to refer to something undefined it's undefined whether it's C.

You seem very confused, it's natural to be if you're quite unintelligent and you don't understand what you're talking about. Don't worry though, I'm here to help those with lesser minds.

And didn't I already tell you to move your autistic ass back to /g/?
No, you hadn't responded to any of my posts before.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List