Cod sursa(job #1645895)
Utilizator | Data | 10 martie 2016 14:16:28 | |
---|---|---|---|
Problema | Factorial | Scor | 5 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.22 kb |
# include <fstream>
using namespace std ;
ifstream fin("fact.in");
ofstream fout("fact.out");
int main(){
int f = 1 , n ;
fin >> n ;
for( int i = 1 ; i <= n ; i++) {
f *= i ;
}
fout << f ;
return 0 ;
}