Dodecagonal number | CPP Program to find the nth Dodecagonal number ; function for Dodecagonal number ; formula for find Dodecagonal nth term ; Driver Code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int Dodecagonal_number ( int n ) { return 5 * n * n - 4 * n ; } int main ( ) { int n = 7 ; cout << Dodecagonal_number ( n ) << endl ; n = 12 ; cout << Dodecagonal_number ( n ) << endl ; return 0 ; }