Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 13 / task1.cpp
blob: bd2ce93530499fe6033951ac71db8571d9a21190 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>
using namespace std;

unsigned fact(unsigned n)
{
	if (n == 0)
		return 1;

	return n * fact(n - 1);
}

int main()
{
	cout << fact(5);
}