Q5Single correct5 Marks13 Apr 2025
Consider the following pseudocode. Assume that a and b are two positive integers. What is the return value of calculate(15, 9)?
```
Procedure calculate(a, b)
diff = 0
if(a < b){
return(calculate(b, a))
}
if(a == b){
return(b)
}
diff = a - b
if(diff > b){
return(calculate(diff, b))
}
else{
return(calculate(b, diff))
}
End calculate
```
―――――――――――――――――――――――――――――――――――――――――――――――――――――――