ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1225. Flags

Compilation error...
Posted by Yermakov Alex <ONPU> 10 May 2010 18:56
#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...
Posted by dAFTc0d3r [Yaroslavl SU] 11 May 2010 02:34
When you got Compil. Error you may check the reason clicking on red Caompilation error link at your submit.