text: Driver code
code: public static void Main ( String [ ] args ) { int n = 3 ; int [ , ] mat = { { 3 , 2 , 1 } , { 9 , 8 , 7 } , { 6 , 5 , 4 } } ; Console . WriteLine ( " Original ▁ Matrix : " ) ; printMat ( mat , n ) ; sortMatRowAndColWise ( mat , n ) ; Console . WriteLine ( " STRNEWLINE Matrix ▁ After ▁ Sorting : " ) ; printMat ( mat , n ) ; } }