Program to check if N is a Tetradecagonal Number | C ++ program for the above approach ; Function to check if N is a Tetradecagonal Number ; Condition to check if the number is a tetradecagonal number ; Driver Code ; Given Number ; Function call
#include <bits/stdc++.h> NEW_LINE using namespace std ; bool istetradecagonal ( int N ) { float n = ( 10 + sqrt ( 96 * N + 100 ) ) / 24 ; return ( n - ( int ) n ) == 0 ; } int main ( ) { int N = 11 ; if ( istetradecagonal ( N ) ) { cout << " Yes " ; } else { cout << " No " ; } return 0 ; }