Hendecagonal number | C # program to find nth Hendecagonal number ; Function to find Hendecagonal number ; Formula to calculate nth Hendecagonal number ; Driver Code
using System ; class GFG { static int hendecagonal_num ( int n ) { return ( 9 * n * n - 7 * n ) / 2 ; } static public void Main ( ) { int n = 3 ; Console . Write ( n + " rd ▁ Hendecagonal ▁ number : ▁ " ) ; Console . WriteLine ( hendecagonal_num ( n ) ) ; n = 10 ; Console . Write ( n + " th ▁ Hendecagonal ▁ number : ▁ " ) ; Console . WriteLine ( hendecagonal_num ( n ) ) ; } }