Program to check if N is a Centered heptagonal number | Function to check that the number is a Centered heptagonal number ; Condition to check if the number is a Centered heptagonal number ; Driver Code ; Function call
function isCenteredheptagonal ( N ) { let n = ( 7 + Math . sqrt ( 56 * N - 7 ) ) / 14 ; return ( n - parseInt ( n ) ) == 0 ; } let n = 8 ; if ( isCenteredheptagonal ( n ) ) { document . write ( " " ) ; } else { document . write ( " " ) ; }