Which of the following code examples is a function that will accept three integer parameters, calculate their average, and return the result?

a. ```Function Average(ByVal intX As Integer, ByVal intY As Integer, _
ByVal intZ As Integer) As Single

Average = (intX + intY + intZ) / 3
End Function
```
b. ```Function Average(ByVal intX As Integer, ByVal intY as Integer, _
ByVal intZ As Integer) As Single

Average = intX + intY + intZ / 3
Return Average
End Function
```
c. ```Function Average(ByRef intX As Integer, ByRef intY as Integer, _
ByRef intZ As Integer, ByRef Average As Double)

Average = (intX + intY + intZ) / 3
End Function
```
d. ```Function Average(ByVal intX As Integer, ByVal IntY as Integer, _
ByVal intZ As Integer) As Single

Return (intX + intY + intZ) / 3
End Function
```

d. ```Function Average(ByVal intX As Integer, ByVal IntY as Integer, _
ByVal intZ As Integer) As Single

Return (intX + intY + intZ) / 3
End Function
```

Computer Science & Information Technology

You might also like to view...

Which of the following is not a valid octal number?

a. 5555 b. 4567 c. 3482 d. 7770

Computer Science & Information Technology

What is the difference between physical and logical topology? Provide examples.

What will be an ideal response?

Computer Science & Information Technology