Consider 3 , 5 , 8 , 10 , 5 , 2 , 1 , 7 , 3 , 13 as an input to the list of n integers. Dry run the following piece of code and find out the answer.
procedure func(a1, a2, . . . , an: integers)
k:= 0
for i:= 1 to n
if i is odd then k: = k+ai+i
return k
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here