int find(int num1, int num2); int first, second; first = num1 * num2 second = fi
ID: 3569914 • Letter: I
Question
int find(int num1, int num2);
int first, second;
first = num1 * num2
second = first - num1 + num2;
cout << find (15 , 25) <, endl;
if (second > 50)
num1 = first / 10;
else
num2 = second / 20;
return num1 + num2;
}
int discover(int one, int two)
{
int secret = 1;
for(int i = one; i < two; i++)
secret = secret * i;
return secret;
}
What is the output of each of the following program segment
cout << find (15 , 25) <, endl;
cout << discovery (3 , 0=9) << endl;
cout << find (10,10) <<
Explanation / Answer
The output of the statement: cout<< fine(15, 25) is:
62
The output of the statement: cout<< discovery(3,9) is:
20160
The output of the statement: cout<< find(10,10) << " " << discovery(10,fine(10,10))<<endl is as follows:
The find(10,10) returns the value: 20
and the discovery(10,find(10,10) returns the value: 213837312
The output of the statement cout<< discovery(x,y)<< endl displays:
1
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.