diff --git a/space/src-c/Makefile b/space/src-c/Makefile new file mode 100644 index 0000000..98439ef --- /dev/null +++ b/space/src-c/Makefile @@ -0,0 +1 @@ +CC = \ No newline at end of file diff --git a/space/src-c/main.c b/space/src-c/src/main.c similarity index 100% rename from space/src-c/main.c rename to space/src-c/src/main.c diff --git a/space/src-lua/Makefile b/space/src-lua/Makefile index e69de29..8b56847 100644 --- a/space/src-lua/Makefile +++ b/space/src-lua/Makefile @@ -0,0 +1,13 @@ +CC = luac + +SRC_DIR = ./src + +TARGET = main.lua + +BUILD_DIR = ../../build + +build: + ${CC} -o ${BUILD_DIR}/lua.luac ${SRC_DIR}/${TARGET} + +run: build + lua ${BUILD_DIR}/lua.luac \ No newline at end of file diff --git a/space/src-lua/src/main.lua b/space/src-lua/src/main.lua index e69de29..fff1fc8 100644 --- a/space/src-lua/src/main.lua +++ b/space/src-lua/src/main.lua @@ -0,0 +1,11 @@ +local function fib(n) + if n == 0 or n == 1 then + return n + else + return fib(n - 1) + fib(n - 2) + end +end + + +local n = io.read("*n") +print(fib(n))