Input: arr[] = {13, 55, 7, 3, 5, 21, 233, 144, 6}
Output: 55 21 144
Explanation:
Composite array elements are {55, 21, 144, 6}.
Fibonacci array elements are {55, 21, 144}.
Therefore, array elements which are both composite as well as Fibonacci are {55, 21, 144}.
Input: arr[] = {34, 13, 11, 8, 3, 55, 233}
Output: 3
Explanation:
Composite array elements are {34, 8, 55}
Fibonacci array elements are {34, 8, 55}
Therefore, array elements which are both composite as well as Fibonacci are {34, 8, 55}.