text: Hyperfactorial of a number | / C ++ program to find the hyperfactorial of a number ; function to calculate the value of hyperfactorial ; initialise the val to 1 ; returns the hyperfactorial of a number ; Driver code
code: #include <bits/stdc++.h> NEW_LINE using namespace std ; #define ll  long long NEW_LINE ll boost_hyperfactorial ( ll num ) { ll val = 1 ; for ( int i = 1 ; i <= num ; i ++ ) { val = val * pow ( i , i ) ; } return val ; } int main ( ) { int num = 5 ; cout << boost_hyperfactorial ( num ) ; return 0 ; }