Pagini recente » Cod sursa (job #1426538) | Istoria paginii runda/splunge6/clasament | Cod sursa (job #1040895) | Cod sursa (job #1522007) | Cod sursa (job #1373370)
#include <iostream>
#include <fstream>
#include <cmath>
using namespace std;
int main()
{
ifstream f;
ofstream g;
f.open("factorial.in");
int k=0, p;
long int i;
f >> p;
f.close();
g.open("factorial.out");
for (i=1; i <= 100000000; i++)
{
if (i % 5 == 0)
{
k = k + 1;
}
if (k == p)
{
g << i;
system("pause");
break;
}
}
g.close();
return 0;
}