Re: Fabonicseries Program required



Mike wrote:
To understand recusrion, you must first understand recursion
Come now. Everyone knows that the best way is:

static int fibonacci (int i) {
if (i <= 1)
return 1;
else
return fibonacci (i - 1) + fibonacci (i - 2);
}

--
John W. Kennedy
"The blind rulers of Logres
Nourished the land on a fallacy of rational virtue."
-- Charles Williams. "Taliessin through Logres: Prelude"

Teachers throughout the whole world use this one to explain recursion :D
.



Relevant Pages