Question #319263

Identify an error in the following pseudocode: (2)

sum = 0

for x = 1 to 10

if y MOD 2 = 0

display y

sum = sum + y


Expert's answer

sum = 0

for x = 1 to 10

  if x MOD 2 == 0

      display x

      sum = sum + x
  endIF
endFor
display sum

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS