mise à jour des tests

This commit is contained in:
Dimitri Lajou
2025-03-27 14:18:02 +01:00
parent 89abf8f85a
commit eef8242f11
142 changed files with 165 additions and 36 deletions

View File

@@ -0,0 +1,32 @@
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)
{
IF n
THEN
RETURN n* fact(n-1)
ELSE
RETURN 1
FI
}