Consider the following functions:
int find(int num)
{
int first, second;
first = num * num;
second = first + num;
if (second > 100)
num = first / 10;
else
num = first / 20;
return num + 2;
}
int discover(int one, int two)
{
int secret = 0;
for (int i = one; i < two; i++)
secret = secret + i * i;
return secret;
}
What is the output of each of the following program segments?
a. cout << find(15) << endl;
b. cout << discover(3, 9) << endl;
c. cout << find(10) << " " << discover(10, find(10)) << endl;
d. x = 12; y = 8;
cout << discover(y, x) << endl;
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.