The intNums array is declared as follows: Dim intNums() As Integer = {10, 5, 7, 2}. Which

Question:

The intNums array is declared as follows: Dim intNums() As Integer = {10, 5, 7, 2}. Which of the following blocks of code correctly calculates the average value stored in the array? The intTotal, intSub, and dblAvg variables contain the number 0 before the loop is processed.
a. Do While intSub < 4
intNums(intSub) = intTotal + intTotal
intSub += 1
Loop
dblAvg = intTotal / intSub
b. Do While intSub < 4
intTotal += intNums(intSub)
intSub = intSub + 1
Loop
dblAvg = intTotal / intSub
c. Do While intSub < 4
intTotal += intNums(intSub)
intSub += 1
Loop
dblAvg = intTotal / intSub – 1
d. Do While intSub < 4
intTotal = intTotal + intNums(intSub)
intSub = intSub + 1
Loop
dblAvg = intTotal / (intSub – 1)

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: