Cod sursa(job #390020)

Utilizator mihai_voiVoicescu Mihai mihai_voi Data 2 februarie 2010 19:08:09
Problema Factorial Scor 5
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.2 kb
#include<fstream.h>
int n,p;
int main()
{
	ifstream f("fact.in");
	ofstream g("fact.out");
	f>>p;
	if(p<0) g<<"-1";
	if(p==0) g<<"1";
	if(p==1) g<<"0";
	if(p>1) 
	{
		g<<(5*2);
	}
	return 0;
}