Fibonacci problem ( Value of Fib ( N ) * Fib ( N ) | C ++ implementation of the approach ; Driver code
#include <iostream> NEW_LINE using namespace std ; int getResult ( int n ) { if ( n & 1 ) return 1 ; return -1 ; } int main ( ) { int n = 3 ; cout << getResult ( n ) ; }