aboutsummaryrefslogtreecommitdiff
path: root/Homework3/recursive.cpp
blob: 281ccd96ffe5ea5c1ad179485a1a7e36b8e1d57d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#include "recursive.h"



long factorial(int a)
{
	if (a == 1 || a == 0) return 1;

	return a * factorial(a - 1);
}