Question: 7. Consider the following pseudocode. procedure pname(N: a positive integer) k:= 0 9:= N/2 while q =[q] k=k+1 q=g/2 return k (a) (6 points)

7. Consider the following pseudocode. procedure pname(N: a positive integer) k:= 0 9:= N/2 while q =[q] k=k+1 q=g/2 return k (a) (6 points) What is the value returned by this procedure when N = 7, 12, and 16, respectively? Explain your answer. (b) (5 points) Describe what this algorithm does. What is the value returned by this procedure when it takes N, a positive integer, as its input?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
