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