Cod sursa(job #2553730)
Utilizator | Data | 22 februarie 2020 11:26:15 | |
---|---|---|---|
Problema | Factorial | Scor | 10 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.35 kb |
#include<iostream>
#include<fstream>
#define fin "fact.in"
#define fout "fact.out"
int main()
{
std::fstream in,out;
int n;
in.open(fin, std::ios::in);
in >> n;
in.close();
int res;
out.open(fout, std::ios::out);
if (n > 0)
{
res = n * 5;
}
if (n == 0)
{
res = 1;
}
out << res;
out.close();
return 0;
}