Driver code
int main ( ) { int arr [ ] = { 1 , 5 , 6 } ; int m = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; int N = 7 ; cout << " Total ▁ number ▁ of ▁ ways ▁ = ▁ " << countWays ( arr , m , N ) ; return 0 ; }