Fibonacci Series
Fibonacci Series
h>
if (n < 3) {
return;
// Function that handles the first two terms and calls the recursive function
void printFib(int n) {
if (n < 1) {
else if (n == 1) {
else if (n == 2) {
}
// When number of terms greater than 2
else {
fib(n, 0, 1);
return;
int main() {
int n = 9;
printFib(n);
return 0;