Cod sursa(job #1502273)

Utilizator OFY4Ahmed Hamza Aydin OFY4 Data 14 octombrie 2015 15:04:26
Problema Factorial Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.4 kb
#include<fstream>
using namespace std;
int main(){

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

    int n=0,p,i=1,temp;

    fin>>p;

    if(p==0){

        fout<<i;
    }
    else{

        do{

            n=n+5;temp=n;

            do{
                temp=temp/5;

                --p;

            }while(j%5==0)
        }while(p>0)

        fout<<n;
    }
}