Cod sursa(job #1455606)

Utilizator Mihai9Oniga Mihai Mihai9 Data 28 iunie 2015 16:39:34
Problema Factorial Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.31 kb
#include <fstream>
using namespace std;
ifstream fin("fact.in");
ofstream fout("fact.out");
int main()
{
    int p,i,c0=0;
    fin>>p;
    if(p==0)
    {
     fout<<"1";
     return 0;
    }
    if(p%10==0)
    {
     fout<<p*5-5;
    }
    else
    {
     fout<<p*5;
    }
    return 0;
}