We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b313ce commit bb68a89Copy full SHA for bb68a89
fibonacci/test.c
@@ -0,0 +1,23 @@
1
+// test data structure:sequence_list
2
+#include<stdio.h>
3
+#include<stdlib.h>
4
+
5
+int fibonacci(int i) {
6
+ if (i <= 0) {
7
+ return 0;
8
+ }
9
+ if (i == 1 || i == 2) {
10
+ return 1;
11
12
+ return fibonacci(i - 1) + fibonacci(i - 2);
13
+}
14
15
16
+int main() {
17
+ printf("__________________");
18
+ int num_100 = fibonacci(45);
19
+ printf("%d\n", num_100);
20
21
+ system("pause");
22
23
0 commit comments