|
|
вернуться в форумCompilation error... #include <iostream> long int fibonacci(const int ); int main() { int N; std:: cin>>N; const int M=N; std::cout << fibonacci(M)*2;; return 0; } long int fibonacci(const int n) { const int m = n; long int t[m],i; int first = 0, second = 1; t[first]=0; t[second]=1; for (i=second+1; i<m-1; ++i) { t[i] = t[first] + t[second]; first = second; second = i; }
return t[i]; } Edited by author 10.05.2010 18:58 Re: Compilation error... When you got Compil. Error you may check the reason clicking on red Caompilation error link at your submit. |
|
|