Driver code
public static void Main ( ) { int [ ] A = { 0 , - 1 , 2 , - 3 , 1 } ; int x = - 2 ; int size = A . Length ; if ( chkPair ( A , size , x ) ) { Console . WriteLine ( " Valid ▁ pair ▁ exists " ) ; } else { Console . WriteLine ( " No ▁ valid ▁ pair ▁ exists ▁ for ▁ " + x ) ; } } }