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 c397204 commit f6f0783Copy full SHA for f6f0783
0x02-functions_nested_loops/104-fibonacci.c
@@ -0,0 +1,28 @@
1
+#include <stdio.h>
2
+/**
3
+ * main - main function
4
+ * Return: always return 0
5
+ */
6
+int main(void)
7
+{
8
+int counter = 2;
9
+float a = 1;
10
+float b = a + 1;
11
+float c = a + b;
12
+printf("%.0f, ", a);
13
+printf("%.0f, ", b);
14
+while (counter < 98)
15
16
+counter++;
17
+printf("%.0f", c);
18
+a = b;
19
+b = c;
20
+c = a + b;
21
+if (counter < 98)
22
23
+printf(", ");
24
+}
25
26
+printf("\n");
27
+return (0);
28
0 commit comments