Can you write the Fibonacci sequence in C language?

Yes, it is possible to write the Fibonacci sequence in C. This can be achieved using the following code: int fibonacci(int n) { if (n <= 1) return n; return fibonacci(n-1) + fibonacci(n-2); }

Guess you like

Origin blog.csdn.net/weixin_42613017/article/details/129486536