Program to check if N is a Pentadecagonal Number | C # program for the above approach ; Function to check if N is a pentadecagon number ; Condition to check if the number is a pentadecagon number ; Driver code ; Given Number ; Function call
using System ; class GFG { public static bool isPentadecagon ( int N ) { double n = ( 11 + Math . Sqrt ( 104 * N + 121 ) ) / 26 ; return ( n - ( int ) n ) == 0 ; } public static void Main ( String [ ] args ) { int N = 15 ; if ( isPentadecagon ( N ) ) { Console . WriteLine ( " Yes " ) ; } else { Console . WriteLine ( " No " ) ; } } }