Program to check if N is a Nonagonal Number | Function to check if N is a is a Nonagonal Number ; Condition to check if the number is a nonagonal number ; Given Number ; Function call
function isnonagonal ( N ) { let n = ( 5 + Math . sqrt ( 56 * N + 25 ) ) / 14 ; return ( n - parseInt ( n ) ) == 0 ; } let N = 9 ; if ( isnonagonal ( N ) ) { document . write ( " " ) ; } else { document . write ( " " ) ; }