Cod sursa(job #1333706)
Utilizator | Data | 3 februarie 2015 15:04:30 | |
---|---|---|---|
Problema | Factorial | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.31 kb |
#include<fstream>
#include<algorithm>
using namespace std;
ifstream fin("fact.in");
ofstream fout("fact.out");
int x,y;
int main()
{
fin>>x;
if(x==0)fout<<1;
else
{
while(x!=0)
{
y=(x%10)*5;
x=x/10;
}
fout<<y;
}
return 0;
}