APL/APL1.2/TP08/fibonacci.c

13 lines
203 B
C
Raw Normal View History

2022-01-10 17:28:28 +01:00
#include <stdio.h>
#include <stdlib.h>
int fib(int n) {
if (n > 1) return n + fib(n-1);
else if (n == 1) return 1;
else return 0;
}
int main(void) {
fibp(15);
return EXIT_SUCCESS;
}