Cod sursa(job #1219043)

Utilizator yaquzoSimion Andrei yaquzo Data 13 august 2014 11:37:02
Problema Factorial Scor 5
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.42 kb
#include <iostream>
#include<fstream>
using namespace std;
ifstream f("fact.in");
ofstream g("fact.out");
 unsigned Max=100000000;

unsigned rezolvare(unsigned p)
{unsigned i;
   for(i=0;i<Max;i++)
   {if(i==p )
   break;
   return i*5;
      }
}


int main()

{unsigned p,N;
    f>>p;
    if(p==0)
    N=1;
    else
    N=rezolvare(p);
    g<<N;
    f.close();
    g.close();
    return 0;
}