Chiliagon Number | C # program for the above approach ; Finding the nth chiliagon number ; Driver code
using System ; class GFG { static int chiliagonNum ( int n ) { return ( 998 * n * n - 996 * n ) / 2 ; } public static void Main ( ) { int n = 3 ; Console . Write ( "3rd ▁ chiliagon ▁ Number ▁ is ▁ = ▁ " + chiliagonNum ( n ) ) ; } }