Centered Dodecagonal Number | C ++ Program to find nth centered Dodecagonal number ; Function to calculate Centered Dodecagonal number ; Formula to calculate nth centered Dodecagonal number ; Driver Code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int centeredDodecagonal ( long int n ) { return 6 * n * ( n - 1 ) + 1 ; } int main ( ) { long int n = 2 ; cout << centeredDodecagonal ( n ) ; cout << endl ; n = 9 ; cout << centeredDodecagonal ( n ) ; return 0 ; }