Cod sursa(job #2021182)

Utilizator CodrinaLISARUCodrina Lisaru CodrinaLISARU Data 12 septembrie 2017 20:04:38
Problema Factorial Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.31 kb
#include <fstream>
int main()
{
    int P,n=0;
    std::ifstream nrzerouri ("fact.in");
    std::ofstream nrnat ("fact.out");
    nrzerouri>>P;
    while (P>0){
        n=n+5;
        P--;
        if (n%25==0){
            P--;
        }
    }
    if (n==0){
        n++;
    }
    nrnat<<n;
}