(iv)
The following function task(Q) is a part of some class. Assume ‘m’ and ‘n’ are positive integers, greater than 0. Answer the questions given below along with dry run / working.
int task(int m, int n)
{ if(m==n)
retum m;
else if(m>n)
return task(m-n, n);
else
retum task(m, n-m);
}
(a) What will the function task() return when the value of m=30 and n=45?
(b) What function does task() perform, apart from recursion?