Program to check if N is a Octadecagon number | / Function to check if N is a Octadecagon Number ; Condition to check if the number is a Octadecagon number ; Given Number ; Function Call
function isOctadecagon ( N ) { let n = ( 14 + Math . sqrt ( 128 * N + 196 ) ) / 32 ; return ( n - parseInt ( n ) ) == 0 ; } let N = 18 ; if ( isOctadecagon ( N ) ) { document . write ( " " ) ; } else { document . write ( " " ) ; }