xref: /aosp_15_r20/external/one-true-awk/testdir/p.44 (revision 9a7741de182b2776d7b30d6355f2585c0780a51b)
1*9a7741deSElliott Hughesfunction fact(n) {
2*9a7741deSElliott Hughes	if (n <= 1)
3*9a7741deSElliott Hughes		return 1
4*9a7741deSElliott Hughes	else
5*9a7741deSElliott Hughes		return n * fact(n-1)
6*9a7741deSElliott Hughes}
7*9a7741deSElliott Hughes{ print $1 "! is " fact($1) }
8