text: Count of integral coordinates that lies inside a Square | C # program for the above approach ; Function to calculate the integral points inside a square ; Driver code
code: using System ; class GFG { static void countIntgralPoints ( int x1 , int y1 , int x2 , int y2 ) { Console . WriteLine ( ( y2 - y1 - 1 ) * ( x2 - x1 - 1 ) ) ; } static void Main ( ) { int x1 = 1 , y1 = 1 ; int x2 = 4 , y2 = 4 ; countIntgralPoints ( x1 , y1 , x2 , y2 ) ; } }