A utility function to print the constructed MST stored in parent [ ] and print Minimum Obtaiable product
static void printMST ( int [ ] parent , int n , int [ , ] graph ) { Console . Write ( " Edge ▁ Weight STRNEWLINE " ) ; int minProduct = 1 ; for ( int i = 1 ; i < V ; i ++ ) { Console . Write ( " { 0 } ▁ - ▁ { 1 } ▁ { 2 } ▁ STRNEWLINE " , parent [ i ] , i , graph [ i , parent [ i ] ] ) ; minProduct *= graph [ i , parent [ i ] ] ; } Console . Write ( " Minimum ▁ Obtainable ▁ product ▁ is ▁ { 0 } STRNEWLINE " , minProduct ) ; }