I have this class:
public class Fibonacci
{
public static int Calculate( int x )
{
if (x <= 0)
{
return 0;
}
else
{
return Calculate(x - 1) + Calculate(x - 2);
}
}
Per a tutorial I'm doing if one inputs 6 one should get 8 as an expected result, but when I run it, it always returns 0. It's recursive so it makes sense to me, but how do they get 8 as an expected result?