Cod sursa(job #252699)

Utilizator mathboyDragos-Alin Rotaru mathboy Data 4 februarie 2009 20:41:17
Problema Factorial Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.26 kb
#include <fstream.h>
ifstream f("fact.in");
ofstream g("fact.out");
int main()
{
    long double i,p,e=2,c;
f>>p;
if(p==1)	return 0;
for(i=5;e<=p;i=i+5)
  { c=i;
  while(c%5==0)
	{
       c=c/5;e++; }}
  g<<i;
  f.close();
  g.close();
  return 0;}