2
(Choose 1 answer)
Which of the following algorithms are recursive?
(i) procedure A(n: nonnegative even integer)if n = 0 then A(n):= 1;else A(n):=A(n-2)*3
(ii) procedure A(n: nonnegative even integer)if n = 0 then y:= 1;elsebeginy:= 1; m = n div 2;for i:=1 to m y:= y*3;end
A. Only (i)
B. Both of them
C. Only (ii)
D. None of them