Cod sursa(job #372106)

Utilizator attila3453Geiszt Attila attila3453 Data 8 decembrie 2009 20:00:10
Problema Factorial Scor 5
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.2 kb
#include <iostream>
#include <fstream>
using namespace std;
ifstream fi("fact.in");
ofstream fo("fact.out");
int p,n;
int main(){
	fi>>p;
	if(p==0) n=1;
	if(p>0&&p>=10) n=p*5-(p/10)*5;
	fo<<n;
}