Program to check if N is a Centered Tridecagonal Number | C ++ program for the above approach ; Function to check if the number N is a Centered tridecagonal number ; Condition to check if the N is a Centered tridecagonal number ; Driver Code ; Given Number ; Function call
#include <bits/stdc++.h> NEW_LINE using namespace std ; bool isCenteredtridecagonal ( int N ) { float n = ( 13 + sqrt ( 104 * N + 65 ) ) / 26 ; return ( n - ( int ) n ) == 0 ; } int main ( ) { int N = 14 ; if ( isCenteredtridecagonal ( N ) ) { cout << " Yes " ; } else { cout << " No " ; } return 0 ; }