Icosidigonal number | C ++ program to find nth Icosidigonal number ; Function to calculate Icosidigonal number ; Formula for finding nth Icosidigonal number ; Driver function
#include <bits/stdc++.h> NEW_LINE using namespace std ; int icosidigonal_num ( long int n ) { return ( 20 * n * n - 18 * n ) / 2 ; } int main ( ) { long int n = 4 ; cout << n << " th ▁ Icosidigonal ▁ number ▁ : " << icosidigonal_num ( n ) ; cout << endl ; n = 8 ; cout << n << " th ▁ Icosidigonal ▁ number : " << icosidigonal_num ( n ) ; return 0 ; }