Pentagonal Pyramidal Number | C # Program to get nth Pentagonal pyramidal number . ; function to get nth Pentagonal pyramidal number . ; Driver Code
using System ; class GFG { static int pentagon_pyramidal ( int n ) { return n * n * ( n + 1 ) / 2 ; } static public void Main ( ) { int n = 4 ; Console . WriteLine ( pentagon_pyramidal ( n ) ) ; } }