Initial commit

This commit is contained in:
Dimitri Lajou
2025-03-21 17:26:31 +01:00
commit 7114c0e978
115 changed files with 1760 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
PROTO INT fact(k)
FUNC VOID main()
{
INT i, t[11]
i := 0
WHILE 11 -i
DO
{
t[i] := fact(i)
i := i+1
}
DONE
i := 0
WHILE 11 -i
DO
{
PRINT "f(", i, ") = ", t[i], "\n"
i := i+1
}
DONE
}
FUNC INT fact(n)
{
INT res
IF n
THEN
res := n* fact(n-1)
ELSE
res := 1
FI
RETURN res
}