Number of cycles in a Polygon with lines from Centroid to Vertices | Function to find the Number of Cycles ; Driver code
function nCycle ( N ) { return ( N ) * ( N - 1 ) + 1 ; } let N = 4 ; document . write ( nCycle ( N ) ) ;