Cod sursa(job #2662830)
Utilizator | Data | 24 octombrie 2020 16:26:22 | |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.28 kb |
#include <fstream>
using namespace std;
int fact( int N )
{
int k=0;
while(N>0)
{
N=N/5;
k=N+k;
}
return k;
}
int main()
{
ifstream fin("fact.in");
ofstream fout("fact.out");
int N;
fin>>N;
fout<<fact(N);
}