feat: move corpus to library

This commit is contained in:
alexm committed 2026-10-06 09:57:04 -04:00
1 parent df12b2a008
commit 9d351b4a0f
1301 files changed
+941859 -4

No files matched your search

@@ -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