Driver code
public static void Main ( ) { int [ , ] M = { { 1 , 1 , 0 , 3 } , { 2 , 3 , 2 , 3 } , { 9 , 3 , 0 , 2 } , { 2 , 3 , 2 , 2 } } ; int k = 3 ; Console . Write ( calcProbability ( M , k ) ) ; } }