Cod sursa(job #733781)

Utilizator Paula-ElenaPaula-Elena Margarit Paula-Elena Data 12 aprilie 2012 23:26:44
Problema Factorial Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.4 kb
# include <fstream>
using namespace std ; 

int main ( )
{   
    ifstream fin("fact.in") ;
    ofstream fout("fact.out") ;
    
    int P , c = 0 , N = 0 ;
    
    fin >> P ; 
    
    if(P == 0) N = 1 ;
    else while(c < P) {
                        N = N + 5 ;
                        c++ ;                    
                       }
    
    fout << N ; 
    
    return 0 ;
}