Cod sursa(job #1943957)

Utilizator alexkosaAlex Kosa alexkosa Data 28 martie 2017 21:34:48
Problema Factorial Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.25 kb
#include <fstream>
using namespace std;
ifstream fin("fact.in");
ofstream fout("fact.out");
int main()
{int p;
fin>>p;
if(p==0)
    fout<<"1";
else if(p==1)
    fout<<"5";
else if(p==2)
    fout<<"10";
else
    fout<<5*(p-1);
return 0;}