From 857de9681685bc5cfd3907ccfe87d8a9b160b968 Mon Sep 17 00:00:00 2001 From: thing 1 Date: Mon, 16 Dec 2024 13:36:15 +0000 Subject: created example --- .../lucas-standen-NEA/writeup2/examples/fib/go/fib.go | 14 ++++++++++++++ .../lucas-standen-NEA/writeup2/examples/fib/go/go.mod | 3 +++ comp/lucas-standen-NEA/writeup2/examples/fib/go/m | Bin 0 -> 2131040 bytes 3 files changed, 17 insertions(+) create mode 100644 comp/lucas-standen-NEA/writeup2/examples/fib/go/fib.go create mode 100644 comp/lucas-standen-NEA/writeup2/examples/fib/go/go.mod create mode 100755 comp/lucas-standen-NEA/writeup2/examples/fib/go/m (limited to 'comp/lucas-standen-NEA/writeup2/examples/fib/go') diff --git a/comp/lucas-standen-NEA/writeup2/examples/fib/go/fib.go b/comp/lucas-standen-NEA/writeup2/examples/fib/go/fib.go new file mode 100644 index 0000000..4ef84a8 --- /dev/null +++ b/comp/lucas-standen-NEA/writeup2/examples/fib/go/fib.go @@ -0,0 +1,14 @@ +package main + +import "fmt" + +func fib(n int) int { + if (n < 2) { + return n + } + return fib(n-1) + fib(n-2) +} + +func main(){ + fmt.Println(fib(10)) +} diff --git a/comp/lucas-standen-NEA/writeup2/examples/fib/go/go.mod b/comp/lucas-standen-NEA/writeup2/examples/fib/go/go.mod new file mode 100644 index 0000000..a851617 --- /dev/null +++ b/comp/lucas-standen-NEA/writeup2/examples/fib/go/go.mod @@ -0,0 +1,3 @@ +module example.com/m/v2 + +go 1.23.4 diff --git a/comp/lucas-standen-NEA/writeup2/examples/fib/go/m b/comp/lucas-standen-NEA/writeup2/examples/fib/go/m new file mode 100755 index 0000000..847fe36 Binary files /dev/null and b/comp/lucas-standen-NEA/writeup2/examples/fib/go/m differ -- cgit v1.2.3