Initial commit

This commit is contained in:
Jeehoon Kang
2020-03-17 17:31:16 +09:00
commit b929dc334d
54 changed files with 4368 additions and 0 deletions

20
examples/fib3.c Normal file
View File

@@ -0,0 +1,20 @@
int fibonacci(int n) {
int i = 0;
int t1 = 0, t2 = 1, next_term = 0;
if (n < 2) {
return n;
}
for (i = 1; i < n; ++i) {
next_term = t1 + t2;
t1 = t2;
t2 = next_term;
}
return t2;
}
int main() {
return fibonacci(9);
}