Question: Read the following segment of code for a recursive function Func( ) and with user enter a = 35, b = 25, what is the

Read the following segment of code for a recursive function Func( ) and with user enter a = 35, b = 25, what is the output? main(){ cout << "Enter a: "; cin >> a; cout << "Enter b: "; cin >> b; cout << "Function = " << func(a, b) << endl; .; } int func(int a, int b) { if (b == 0) return a; else return func(b, a%b); }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!