summaryrefslogtreecommitdiffstats
path: root/sample.cpp
blob: 72a120a8625485e2d0d04481075ba1a8700d83c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
#include <sample.h>

int Factorial(int n)
{
    int result = 1;
    for (int i = 1; i <= n; i++)
    {
        result *= i;
    }
    return result;
}
OpenPOWER on IntegriCloud