Question

Count the number of + operations done by this algorithm.

{eq}x leftarrow 1 \

for \

i in {1, 2, 3} \

do \

quadquad for \

quadquad j in {1, 2, 3, 4} \

quadquad do \

quadquad quadquad x leftarrow x + x \

quadquad for \

quadquad k in {1, 2, 3, 4, 5, 6} \

quadquad do \

quadquad quadquad x leftarrow x + 1 \

quadquad quadquad x leftarrow x + 5 \

{/eq}

EXPERT ANSWER

The given algorithm consist of