|
Can you sort this one out? The procedure Nutty(a,
b, c : integer) is a recursive procedure.
Nutty(a, b, c : integer)
if a > b then
output(c)
else
output(a)
Nutty(b, c, a)
endif
|
What would be the output from these ...
(i) |
Nutty(5, 4, 3) |
Reveal answer |
3 |
(ii) |
Nutty(3, 5, 4) |
Reveal answer |
3 3 |
(iii) |
Nutty(3, 4, 5) |
Reveal answer |
3 4 4 |
|
|