Quote Originally Posted by ooOOJaVaOOoo
what is the D for? i cant put average = (xD / yD)

VB Code:
  1. Public Function GetAverage(ByVal x As Integer, ByVal y As Integer) As Integer
  2.         Dim average As Decimal
  3.         average = (x / y)
  4.  
  5.         Dim daverage As Double = Double.Parse(average)
  6.  
  7.         average = (Math.Floor(daverage))
  8.         Return average
  9.     End Function

D on the end of a number implies it is of type decimal. R is double, I is integer etc...

However Johns method of using the integer division over decimal division will get you there in less code.