Driver code
public static void Main ( String [ ] args ) { int [ ] a = { 1 , 2 , 6 , 2 , 3 , 6 , 9 , 18 , 3 , 9 } ; int n = a . GetLength ( 0 ) ; int r = 3 ; Console . Write ( subsequences ( a , n , r ) ) ; } }