Pentatope number | C ++ Program to find the nth Pentatope Number ; Function that returns nth pentatope number ; Drivers Code ; For 5 th PentaTope Number ; For 11 th PentaTope Number
#include <bits/stdc++.h> NEW_LINE using namespace std ; int pentatopeNum ( int n ) { return ( n * ( n + 1 ) * ( n + 2 ) * ( n + 3 ) ) / 24 ; } int main ( ) { int n = 5 ; cout << pentatopeNum ( n ) << endl ; n = 11 ; cout << pentatopeNum ( n ) << endl ; return 0 ; }