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()
```


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()
```

Computer Science & Information Technology

You might also like to view...

A ____________ control is a rectangular container for other controls.

a. Combo Box b. List Box c. Group Box d. Panel

Computer Science & Information Technology

________ is the process of updating data on your smartphone and computer so they are the same

Fill in the blank(s) with correct word

Computer Science & Information Technology

The default theme in a new document is:

A) Formal. B) Office. C) Windows. D) Word.

Computer Science & Information Technology

A predefined database that includes professionally designed tables, forms, reports, and other objects.

What will be an ideal response?

Computer Science & Information Technology