Question: What is the output? #include using namespace std; void MyMathFunction ( int a , int r , int counter ) { int val; val =

What is the output?
#include using namespace std; void MyMathFunction(int a, int r, int counter){ int val; val = a * r; cout << val <<""<< endl; if (counter >4){ cout << "End"; } else { MyMathFunction(val, r, counter +1); }} int main (){ int mainNum1=1; int mainNum2=2; int ctr =0; MyMathFunction(mainNum1, mainNum2, ctr); return 0; }
Group of answer choices
22222
248163264 End
2481632 End
2481632

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!