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...


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



Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here