blob: 72a120a8625485e2d0d04481075ba1a8700d83c8 [file] [log] [blame]
Matthew Barth00b1e5b2016-09-09 12:15:46 -05001#include <sample.h>
2
3int Factorial(int n)
4{
5 int result = 1;
Patrick Venture0b02be92018-08-31 11:55:55 -07006 for (int i = 1; i <= n; i++)
Matthew Barth00b1e5b2016-09-09 12:15:46 -05007 {
8 result *= i;
9 }
10 return result;
11}