Number of ways N can be divided into four parts to construct a rectangle | C # implementation of the approach ; Function to return the required number of ways ; Driver code
using System ; class GFG { static int cntWays ( int n ) { if ( n % 2 == 1 ) { return 0 ; } else { return ( n - 2 ) / 4 ; } } public static void Main ( String [ ] args ) { int n = 18 ; Console . WriteLine ( cntWays ( n ) ) ; } }