Which of the following code fragments calculates the average of 5 numbers input with an input box, and displays the result in lblResult?
A) intCount = 5
intSum = 0
Do While intCount = 5
IntSum = CInt(InputBox("enter a number") )
SngAvg = intSum / intCount
LblResult.Text = sngAvg.ToString()
Loop
B) intCount = 0
intSum = 0
Do While intCount < =5
IntValue = CInt(InputBox("enter a number") )
IntSum = intSum + intValue
Loop
SngAvg = intSum / intCount
LblResult.Text = sngAvg.ToString()
C) intCount = 0
intSum = 0
Do While intCount < = 5
IntValue = CInt(InputBox("enter a number") )
IntSum = intSum + intValue
IntCount += 1
Loop
SngAvg = intSum / intCount
LblResult.Text = sngAvg.ToString()
D) intCount = 0
intSum = 0
Do While intCount < 5
IntValue = CInt(InputBox("enter a number") )
IntSum = += intValue
IntCount += 1
Loop
SngAvg = intSum / intCount
LblResult.Text = sngAvg.ToString()
Correct Answer:
Verified
Q26: Which of the following ListBox properties can
Q27: The InputBox function always returns a _value.
A)
Q28: Which of the following sections of code
Q29: A counter is a(n) _that can be
Q30: A difference between a ListBox and a
Q31: Which type of loop uses a pretest
Q32: What will be the final value of
Q33: If lstMonths is a ListBox, which of
Q35: Which of the following statements correctly displays
Q36: How many times will the message I
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents