text: Enneadecagonal number | C ++ program to find nth Enneadecagonal number ; Function to calculate Enneadecagonal number ; Formula for finding nth Enneadecagonal number ; Drivers code
code: #include <bits/stdc++.h> NEW_LINE using namespace std ; int nthEnneadecagonal ( long int n ) { return ( 17 * n * n - 15 * n ) / 2 ; } int main ( ) { long int n = 6 ; cout << n << " th ▁ Enneadecagonal ▁ number ▁ : " << nthEnneadecagonal ( n ) ; return 0 ; }