Write the pseudocode to define and initialize a four element array called "evens," with even numbers from 2 to 8, and then find the total of the values in the array using a while loop.
What will be an ideal response?
start
Declarations
num count = 0
num total = 0
num scores[4] = 2,4,6,8
while count < 4
total = total + scores[count]
count = count + 1
endwhile
stop
You might also like to view...
A new class of objects can be created conveniently by inheritance—the new class (called the ________) starts with the characteristics of an existing class (called the ________), possibly customizing them and adding unique characteris-tics of its own.
Fill in the blank(s) with the appropriate word(s).
Which of the following NIST publications is known as The NIST Handbook?
A) SP 800-12 B) SP 800-16 C) SP 800-50 D) SP 800-100
If myVec has type vector
What will be an ideal response?
How long do current U.S. laws grant copyright protection?
A. The life of the author (creator) plus 70 years B. The life of the author (creator) plus 50 years C. 99 years D. 101 years