Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

C++ fibo

#include <iostream>
using namespace std;

long long c=0;
int fib(int a){
    if(a==1||a==2){
        return 1;
    }
    return fib(a-1)+fib(a-2);
}

int main(){
    cout << fib(6);
}

//8
Source by hackmd.io #
 
PREVIOUS NEXT
Tagged: #fibo
ADD COMMENT
Topic
Name
8+3 =