We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2967263 commit c397204Copy full SHA for c397204
0x02-functions_nested_loops/103-fibonacci.c
@@ -0,0 +1,25 @@
1
+#include <stdio.h>
2
+
3
+/**
4
+ * main - main function
5
+ * Return: always return 0
6
+ */
7
+int main(void)
8
+{
9
+int counter = 0;
10
+long int a = 1;
11
+long int b = a;
12
+long int c = a + b;
13
+while (c < 4000000)
14
15
+if (c % 2 == 0)
16
17
+counter += c;
18
+}
19
+a = b;
20
+b = c;
21
+c = a + b;
22
23
+printf("%d\n", counter);
24
+return (0);
25
0 commit comments