Program to check if N is a Pentadecagonal Number | Function to check if N is a Pentadecagon number ; Condition to check if the number is a Pentadecagon number ; Given Number ; Function call
function isPentadecagon ( N ) { var n = ( 11 + Math . sqrt ( 104 * N + 121 ) ) / 26 ; return ( n - parseInt ( n ) ) == 0 ; } var N = 15 ; if ( isPentadecagon ( N ) ) { document . write ( " " ) ; } else { document . write ( " " ) ; }