Icosidigonal number | C # program to find nth Icosidigonal number ; Function to calculate Icosidigonal number ; Formula for finding nth Icosidigonal number ; Driver Code
using System ; class GFG { static int icosidigonal_num ( int n ) { return ( 20 * n * n - 18 * n ) / 2 ; } static public void Main ( ) { int n = 4 ; Console . Write ( n + " th ▁ Icosidigonal ▁ " + " number ▁ : " ) ; Console . WriteLine ( icosidigonal_num ( n ) ) ; n = 8 ; Console . Write ( n + " th ▁ Icosidigonal ▁ " + " number ▁ : " ) ; Console . WriteLine ( icosidigonal_num ( n ) ) ; } }