Program to check if N is a Enneadecagonal Number | C ++ 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
#include <bits/stdc++.h> NEW_LINE using namespace std ; bool isenneadecagonal ( int N ) { float n = ( 15 + sqrt ( 136 * N + 225 ) ) / 34 ; return ( n - ( int ) n ) == 0 ; } int main ( ) { int N = 19 ; if ( isenneadecagonal ( N ) ) { cout << " Yes " ; } else { cout << " No " ; } return 0 ; }