From 68baa2efd72cb150dd6138d7b208b2621bcfc431 Mon Sep 17 00:00:00 2001 From: thing 1 Date: Thu, 5 Dec 2024 12:04:08 +0000 Subject: made a load of stuff --- comp/lucas-standen-NEA/writeup2/examples/fib_example.zpy | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 comp/lucas-standen-NEA/writeup2/examples/fib_example.zpy (limited to 'comp/lucas-standen-NEA/writeup2/examples/fib_example.zpy') diff --git a/comp/lucas-standen-NEA/writeup2/examples/fib_example.zpy b/comp/lucas-standen-NEA/writeup2/examples/fib_example.zpy new file mode 100644 index 0000000..2c66618 --- /dev/null +++ b/comp/lucas-standen-NEA/writeup2/examples/fib_example.zpy @@ -0,0 +1,13 @@ +(defun fib int n:int) + (if (< n 2)) + (return n) + (endif) + + (return (+ (fib (- n 1)) (fib (- n 2)))) +(endfun) + +(defun main int) + (let n:int 30) + (printint (fib n)) + (printchar '\n') +(endfun) -- cgit v1.2.3