Program to check if N is a Centered heptagonal number | C # implementation to check that a number is a centered heptagonal number or not ; Function to check that the number is a centered heptagonal number ; Condition to check if the number is a centered heptagonal number ; Driver Code ; Function call
using System ; class GFG { static bool isCenteredheptagonal ( int N ) { double n = ( 7 + Math . Sqrt ( 56 * N - 7 ) ) / 14 ; return ( n - ( int ) n ) == 0 ; } static public void Main ( ) { int n = 8 ; if ( isCenteredheptagonal ( n ) ) { Console . Write ( " Yes " ) ; } else { Console . Write ( " No " ) ; } } }