Cod sursa(job #1889484)

Utilizator octavian.a.niculescuOctavian Niculescu octavian.a.niculescu Data 22 februarie 2017 18:58:09
Problema Factorial Scor 5
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.29 kb
#include <iostream>
#include <fstream>

using namespace std;

int main()
{
    int p, n=1, x=0, ok=0;
    ifstream f("fact.in");
    ofstream g("fact.out");
    f>>p;
    do {
    x=x+5;
    n=x;
    ok++;
    }while(ok<p);
    f.close();
    g<<n<<'\n';
    g.close();
}