Chiliagon Number | C ++ program for above approach ; Finding the nth chiliagon Number ; Driver Code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int chiliagonNum ( int n ) { return ( 998 * n * n - 996 * n ) / 2 ; } int main ( ) { int n = 3 ; cout << "3rd ▁ chiliagon ▁ Number ▁ is ▁ = ▁ " << chiliagonNum ( n ) ; return 0 ; }