diff options
| author | Carson Fleming <cflems@cflems.net> | 2026-07-17 03:20:34 -0700 |
|---|---|---|
| committer | Carson Fleming <cflems@cflems.net> | 2026-07-17 03:20:34 -0700 |
| commit | 155d1971b7cd56d3206808c36c6b40357bc31cbb (patch) | |
| tree | b06b4c59d7eaa8084985b82e73b975d194eb8929 /test | |
| parent | 99af8891f6672493939bf3b43084082884e28d04 (diff) | |
| download | ccc-155d1971b7cd56d3206808c36c6b40357bc31cbb.tar.gz | |
almost fibonacci but it needs the type checker
Diffstat (limited to 'test')
| -rw-r--r-- | test/fibonacci.c | 4 |
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) { |
