행복한 프로그래밍

피보나치 수열

영웅*^%&$ 2018. 2. 2. 09:11
728x90

int Fibonacci (int n=100;)
{
    if(n<=2)
    {
    return 1;
    }
    else
    {
        return Fibonacci(n-1)+Fibonacci(n-2);
        }
}

728x90