0

Here is the formula i'm suppose to use:

i'm suppose to to write a complete program with a function using two parameters to calculate:

```
x(!)^n, where x(!)^n = x!! ... ! use BigInts For the calculations
-----
n times
```

this wis what I have, i don't think it's right, if you can tell me what is wrong, and correct it, i'd greatly appreciate it.

```
#include <iostream>
#include <cmath>
#include "bigint.h" //uses a class that is specified in my header file
//along with bigint.cpp
using namespace std;
BigInt Factorial(int num);
int main()
{
int num;
int power;
int current = 0;
cout << "Enter A Number: ";
cin >> num;
cout << "Enter A Power: ";
cin >> power;
while(current <= num)
{
cout << current << "! = " << Factorial(pow(current,power)) << endl;
current += 1;
}
return 0;
}
BigInt Factorial(int num)
{
BigInt product = 1;
int count = 0;
while(count < num)
{
count += 1;
product *= count;
}
return product;
}
```

*Edited 3 Years Ago by Dani*: Formatting fixed