Baseline: tree as shared

This commit is contained in:
alexm committed 2026-10-05 03:03:38 +00:00
commit 659c03bbf8
1471 files changed
+990535

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
// A run that stops: dividing by zero inside a function; the lab blames the line and shows the values.
// STOPS: divide
FUNCTION MEAN(Xs : LIST OF INTEGER) RETURNS FLOAT
DECLARE Total : INTEGER
Total <- 0
FOR EACH X IN Xs
Total <- Total + X
NEXT X
RETURN Total / LENGTH(Xs)
ENDFUNCTION
OUTPUT MEAN([])