Study the following array called numArr. Indicate what the values in numArr would be after the given code has been executed. 1.1 4 8 10 120 14 15 99 102 55 for x = 0 to 9 if numArr (x) Mod 2 = 0 then numArr (x) = numArr (x) + 5 endif if x Mod 2 = 0 then numArr (x) = numArr (x) + 1 endif next x x = x - 5 numArr (x) 10 for y = 2 to 8 step 2 %3D numArr (y) = numArr (x) + y next y for z = 1 to 6 step 3 numArr (z) - z * y + x next z numArr (x) = numArr (z)

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 2RQ
icon
Related questions
Question

pseodocode / c++

Study the following array called numArr. Indicate what the values in numArr Would
be after the given code has been executed.
1.1
4
8
10
120
14
15
99
102
55
for x = 0 to 9
if numArr (x) Mod 2 = 0 then
numArr (x)
= numArr (x) + 5
endif
if x Mod 2 = 0 then
numArr (x)
= numArr (x) + 1
endif
next x x = x - 5 numArr (x)
10 for y = 2 to 8 step 2
numArr (y)
= numArr (x) + y next
for z = 1 to 6 step 3
numArr (z)
*
y + x
next z
numArr (x)
= numArr (z)
Transcribed Image Text:Study the following array called numArr. Indicate what the values in numArr Would be after the given code has been executed. 1.1 4 8 10 120 14 15 99 102 55 for x = 0 to 9 if numArr (x) Mod 2 = 0 then numArr (x) = numArr (x) + 5 endif if x Mod 2 = 0 then numArr (x) = numArr (x) + 1 endif next x x = x - 5 numArr (x) 10 for y = 2 to 8 step 2 numArr (y) = numArr (x) + y next for z = 1 to 6 step 3 numArr (z) * y + x next z numArr (x) = numArr (z)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Stack operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning