Cod sursa(job #1524441)
Utilizator | Data | 14 noiembrie 2015 05:30:09 | |
---|---|---|---|
Problema | Factorial | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.29 kb |
#include <fstream>
using namespace std;
ifstream f("fact.in");
ofstream g("fact.out");
int n=0,p,nr0;
int main()
{
f>>p;
if(!p) g<<1;
else
{
while(nr0!=p)
{
n+=5;
nr0++;
}
g<<n;
}
return 0;
}