- Home
·
- Miscellaneous
·
- Simple function to prompt a user for three numbers and take the average of them.
Simple function to prompt a user for three numbers and take the average of them.
Simple function to prompt a user for three numbers and take the average of them.
Rate Simple function to prompt a user for three numbers and take the average of them.
(1(1 Vote))
'function to calculate the average of 3 numbers
Const CountofNum = 3
Dim Sum, intNum As Long
Dim intCount As Integer
Sum = 0
For intCount = 1 To CountofNum Step 1
intNum = InputBox("Enter a number", "Value")
Sum = Sum + intNum
Next intCount
MyAverage = Format(Sum / CountofNum, "Fixed")
End Function
Simple function to prompt a user for three numbers and take the average of them. Comments
No comments yet — be the first to post one!
Post a Comment