Program to check if N is a Icositrigonal number | Java 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
import java . util . * ; class GFG { static boolean isicositrigonal ( int N ) { float n = ( float ) ( 19 + Math . sqrt ( 168 * N + 361 ) ) / 42 ; return ( n - ( int ) n ) == 0 ; } public static void main ( String args [ ] ) { int i = 23 ; if ( isicositrigonal ( i ) ) { System . out . print ( " Yes " ) ; } else { System . out . print ( " No " ) ; } } }