Question: USing c++ BigInt project Need help modifying this // modify this function so it throws an exception if the result overflows int factorial(int n) {
USing c++
BigInt project
Need help modifying this
// modify this function so it throws an exception if the result overflows
int factorial(int n)
{
if (n == 0)
return 1;
else
return n * factorial(n-1);
}
Output is gonna look like this.

Fact 0):1 Fact(1:1 Fact 2:2 Fact 3:6 Fact (4:24 Fact (5:120 Fact 6:720 Fact(:5040 Fact 8:40320 Fact 9362880 Fact (10:3628800 Fact (11):39916800 Fact(12 :479001600 Fact 13:0verf low Fact 14):Overflow Fact(15) :0uerf low Fact(16 :0verf low Fact(17> :Overflow Fact(18) :0verf low Fact(19 :0uerflow
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
