Program to check if N is a Enneadecagonal Number | Java program for the above approach ; Function to check if number N is a enneadecagonal number ; Condition to check if N is a enneadecagonal number ; Driver Code ; Given Number ; Function call
class GFG { static boolean isenneadecagonal ( int N ) { float n = ( float ) ( 15 + Math . sqrt ( 136 * N + 225 ) ) / 34 ; return ( n - ( int ) n ) == 0 ; } public static void main ( String [ ] args ) { int N = 19 ; if ( isenneadecagonal ( N ) ) { System . out . println ( " Yes " ) ; } else { System . out . println ( " No " ) ; } } }