Cod sursa(job #1110300)

Utilizator Razvy16Farte Razvan Dan Razvy16 Data 17 februarie 2014 22:39:21
Problema Factorial Scor 5
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.26 kb
#include <iostream>
#include <fstream>
#include <math.h>
using namespace std;
int main()
{
ifstream f("fact.in");
ofstream g("fact.out");
 int n=1,p,k=1;

    f>>p;


    while(k<pow(10,p))
        {n++;
        k=k*n;}
        g<<n;

    return 0;
}