Program to check if N is a Icositrigonal number | C ++ implementation to check that a number is a icositrigonal number or not ; Function to check that the number is a icositrigonal number ; Condition to check if the number is a icositrigonal number ; Driver Code ; Function call
#include <bits/stdc++.h> NEW_LINE using namespace std ; bool isicositrigonal ( int N ) { float n = ( 19 + sqrt ( 168 * N + 361 ) ) / 42 ; return ( n - ( int ) n ) == 0 ; } int main ( ) { int i = 23 ; if ( isicositrigonal ( i ) ) { cout << " Yes " ; } else { cout << " No " ; } return 0 ; }