text: Fibonacci Cube Graph | CPP code to find vertices in a fibonacci cube graph of order n ; function to find fibonacci number ; function for finding number of vertices in fibonacci cube graph ; return fibonacci number for f ( n + 2 ) ; driver program
code: #include <iostream> NEW_LINE using namespace std ; int fib ( int n ) { if ( n <= 1 ) return n ; return fib ( n - 1 ) + fib ( n - 2 ) ; } int findVertices ( int n ) { return fib ( n + 2 ) ; } int main ( ) { int n = 3 ; cout << findVertices ( n ) ; return 0 ; }