Cod sursa(job #157950)

Utilizator tranzistorciceo sebi tranzistor Data 13 martie 2008 13:12:33
Problema Nunta Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.44 kb
#include <fstream>

using namespace std;

ifstream fin("nunta.in");
ofstream fout("nunta.out");

int main()
{
    long long unsigned a,b,n,m,i;
    fin>>n;
    if(n==1)
    fout<<"1";
    return 0;
    
    
                     a=1;
                     b=2;
    for(i=3;i<=15;i++)
    {
                     m=a+b;
                     a=b;
                     b=m;
     
}
    
   fout<<m;
    
    
    return 0;
}