360 | Java program for above approach ; Function to find the nth 360 - gon Number ; Driver code
class GFG { static int gonNum360 ( int n ) { return ( 358 * n * n - 356 * n ) / 2 ; } public static void main ( String [ ] args ) { int n = 3 ; System . out . print ( gonNum360 ( n ) ) ; } }