Cod sursa(job #1110452)
Utilizator | Data | 18 februarie 2014 08:32:39 | |
---|---|---|---|
Problema | Factorial | Scor | 5 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.27 kb |
#include <iostream>
#include <fstream>
using namespace std;
int main()
{int n=0,k=1,p;
ifstream f("fact.in");
ofstream g("fact.out");
f>>p;
while(k<=p)
{n=n+5;
k++;
if(n%25==0)
k++;}
g<<n;
return 0;
}