Concentric Hexagonal Numbers | CPP program to find nth concentric hexagon number ; Function to find nth concentric hexagon number ; Driver code ; Function call
#include <bits/stdc++.h> NEW_LINE using namespace std ; int concentric_Hexagon ( int n ) { return 3 * pow ( n , 2 ) / 2 ; } int main ( ) { int n = 3 ; cout << concentric_Hexagon ( n ) ; return 0 ; }