text: Count Distinct Rectangles in N * N Chessboard | Function to count distinct rectangles ; Driver Code
code: function count ( N ) { var a = 0 ; a = ( N * ( N + 1 ) ) / 2 ; return a ; } var n = 4 ; document . write ( count ( n ) ) ;