Consider the following function:
int secret(int m, int n)
{
int temp = 0;
for (int i = 1; i < abs(n); i++)
temp = temp + i * m;
return temp;
}
a. What is the output of the following C++ statements?
i. cout << secret(3, 6) << endl;
ii. cout << secret(5, -4) << endl;
b. What does the function secret do?
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.