C # implementation of the approach
using System ; class GFG { static double [ ] find_Centroid ( double [ , ] v ) { double [ ] ans = new double [ 2 ] ; int n = v . GetLength ( 0 ) ; double signedArea = 0 ;