Driver code
int main ( ) { int a [ MAX ] [ MAX ] = { { 1 , 2 , 3 , 4 , 5 , 6 } , { 7 , 8 , 9 , 10 , 11 , 12 } , { 13 , 14 , 15 , 16 , 17 , 18 } } ; int k = 17 ; cout << findK ( a , 3 , 6 , k ) << endl ; return 0 ; }