Program to check if N is a Tetradecagonal Number | Java 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
import java . lang . Math ; class GFG { public static boolean istetradecagonal ( int N ) { double n = ( 10 + Math . sqrt ( 96 * N + 100 ) ) / 24 ; return ( n - ( int ) n ) == 0 ; } public static void main ( String [ ] args ) { int N = 11 ; if ( istetradecagonal ( N ) ) { System . out . println ( " Yes " ) ; } else { System . out . println ( " No " ) ; } } }