Consider the following definition of the recursive function mystery.int mystery(int first, int last){ if (first > last) return 0; else if (first == last) return first; else return first + mystery(first + 1, last - 1);}What is the output of the following statement?cout
A. 13
B. 21
C. 40
D. 42
Answer: B
Computer Science & Information Technology
You might also like to view...
If your source data for a mail merge is stored in a Word table, the first row of the table must contain the record of the first set of data
Indicate whether the statement is true or false
Computer Science & Information Technology
The sheets that supply the data that a summary sheet totals and displays are called ________
Fill in the blank(s) with correct word
Computer Science & Information Technology