Showing posts with label C# hackerrank.. Show all posts
Showing posts with label C# hackerrank.. Show all posts

Wednesday, February 17, 2016

hackerrank. C# factorial

int Factorial(int i)
{
    if (i <= 1)
        return 1;
    return i * Factorial(i - 1);
}
http://stackoverflow.com/questions/16583665/for-loop-to-calculate-factorials