Pentadecagonal Number | C ++ program to find Nth Pentadecagonal number ; Function to find N - th Pentadecagonal number ; Formula to calculate nth Pentadecagonal number ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int Pentadecagonal_num ( int n ) { return ( 13 * n * n - 11 * n ) / 2 ; } int main ( ) { int n = 3 ; cout << Pentadecagonal_num ( n ) << endl ; n = 10 ; cout << Pentadecagonal_num ( n ) << endl ; return 0 ; }