Fibonacci Cube Graph | java 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 code
public class GFG { static int fib ( int n ) { if ( n <= 1 ) return n ; return fib ( n - 1 ) + fib ( n - 2 ) ; } static int findVertices ( int n ) { return fib ( n + 2 ) ; } public static void main ( String args [ ] ) { int n = 3 ; System . out . println ( findVertices ( n ) ) ; } }