360 | C ++ implementation for above approach ; Function to find the nth 360 - gon Number ; Driver Code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int gonNum360 ( int n ) { return ( 358 * n * n - 356 * n ) / 2 ; } int main ( ) { int n = 3 ; cout << gonNum360 ( n ) ; return 0 ; }