text: Find all Pairs possible from the given Array | C # implementation to find all Pairs possible from the given Array ; Function to print all possible pairs from the array ; Nested loop for all possible pairs ; Driver code
code: using System ; class GFG { static void printPairs ( int [ ] arr , int n ) { for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { Console . Write ( " ( " + arr [ i ] + " , ▁ " + arr [ j ] + " ) " + " , ▁ " ) ; } } } public static void Main ( string [ ] args ) { int [ ] arr = { 1 , 2 } ; int n = arr . Length ; printPairs ( arr , n ) ; } }