Mai intai trebuie sa te autentifici.
Cod sursa(job #809315)
Utilizator | Data | 8 noiembrie 2012 09:25:48 | |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.39 kb |
#include<iostream>
#include<fstream>
using namespace std;
ifstream f;
ofstream g;
int p,n;
void citire()
{
f.open("factorial.in");
f >> p;
f.close();
}
void scriere()
{
g.open("factorial.out");
g << n;
g.close();
}
int main()
{
citire();
if(p==0)
n=1;
else
n=5*p;
scriere();
return 0;
}