Program to check if N is a Centered Octadecagonal number | Function to check that the number is a Centered Octadecagonal number ; Implement the formula generated ; Condition to check if the number is a Centered Octadecagonal number ; Driver Code ; Function call
function isCenteredOctadecagonal ( N ) { let n = parseInt ( ( 9 + Math . sqrt ( 36 * N + 45 ) ) / 18 ) ; return ( n - parseInt ( n ) ) == 0 ; } let n = 19 ; if ( isCenteredOctadecagonal ( n ) ) { document . write ( " " ) ; } else { document . write ( " " ) ; }