3.5k views
1 vote
int puzzle(int start, int end) { if (start > end) return start - end; else if (start == end) return start + end; else return end * puzzle(start + 1, end - 1); } Consider the accompanying definition of a recursive function. What is the output of the following statement? cout << puzzle(3, 7) << endl; a. 10 b. 21 c. 42 d. 420

User Dufaux
by
7.2k points

1 Answer

7 votes

Answer:

d. 420

Step-by-step explanation:

User Apoteet
by
7.3k points