Cod sursa(job #824565)
Utilizator | Data | 26 noiembrie 2012 19:11:25 | |
---|---|---|---|
Problema | Factorial | Scor | 5 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.32 kb |
#include<iostream>
#include<cmath>
#include<fstream>
using namespace std;
ifstream fin("fact.in");
ofstream fout("fact.out");
int main () {
int n,i,k;
long p=1;
fin >> n;
for (i =1;i<=n;i++)
p=p*pow(i,i);
fout<< p;
fin.close();
fout.close();
return 0;
}