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 @@
// Finance flavor: a loop that updates a FLOAT, with ROUND for reporting.
// EXPECT: 1628.89
FUNCTION BALANCE_AFTER(Principal : FLOAT, Rate : FLOAT, Years : INTEGER) RETURNS FLOAT
DECLARE B : FLOAT
B <- Principal
FOR Y <- 0 TO Years
B <- B * (1 + Rate)
NEXT Y
RETURN B
ENDFUNCTION
OUTPUT ROUND(BALANCE_AFTER(1000.0, 0.05, 10) * 100) / 100