summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarson Fleming <cflems@cflems.net>2026-07-17 03:20:34 -0700
committerCarson Fleming <cflems@cflems.net>2026-07-17 03:20:34 -0700
commit155d1971b7cd56d3206808c36c6b40357bc31cbb (patch)
treeb06b4c59d7eaa8084985b82e73b975d194eb8929 /test
parent99af8891f6672493939bf3b43084082884e28d04 (diff)
downloadccc-155d1971b7cd56d3206808c36c6b40357bc31cbb.tar.gz
almost fibonacci but it needs the type checker
Diffstat (limited to 'test')
-rw-r--r--test/fibonacci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/fibonacci.c b/test/fibonacci.c
index c241be9..39a32be 100644
--- a/test/fibonacci.c
+++ b/test/fibonacci.c
@@ -1,6 +1,6 @@
int fib (int n) {
- if (n <= 1) return 1;
- return n * fib(n - 1);
+ if (n) return n * fib(n-1);
+ return 1;
}
int main (int argc, char** argv) {