Cod sursa(job #2282732)
Utilizator | mateisirghe mateisirghe | Data | 14 noiembrie 2018 14:13:32 |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.16 kb |
#include <iostream>
using namespace std;
int fact(int n)
{
int p=1;
while(n>0)
{
p=p*n;
n--;
}
return p;
}