Cod sursa(job #1033491)

Utilizator killlerr1Chilom Mircea killlerr1 Data 17 noiembrie 2013 00:23:37
Problema Factorial Scor 5
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.36 kb
#include <fstream>
using namespace std;

ifstream homie("fact.in");
ofstream doth("fact.out");

int main()
{
    int p;
    homie >> p;
    if( p == 0 )
        doth << 1 << ' ';
    else
        if( (p-1) * 5 < 0 )
            doth << -1 << ' ';
        else
            doth << (p-1) * 5 << ' ';
    homie.close();
    doth.close();
    return 0;
}