Cod sursa(job #372103)

Utilizator attila3453Geiszt Attila attila3453 Data 8 decembrie 2009 19:58:24
Problema Factorial Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.22 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;
	else{
		if(p>=10) n=p*5-5;
			else n=p*5;
	}
	fo<<n;
}