Pragma: UseUnicode

BeginProgram: Functions5

BeginFunction: <long> factorial(<int> x)
	BeginIf: x <= 1
		Return: 1
	EndIf
	Return: x * factorial(x - 1)
EndFunction

BeginMain:
	BeginFor: <int> x in FRANGE(1, 10)
		PrintLine: format("{0:d}! = {1:d}", x, factorial(x))
	EndFor
EndMain
EndProgram
