How to return Quotient and Remainder for given two numbers
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 10 | 'Math - How to return Quotient and Remainder for given two numbers Option Explicit Public Sub GetQuotientAndRemainder(ByVal iNum1 As Integer, ByVal iNum2 As Integer) Dim lQuotient As Long, dRemainder As Double lQuotient = Int(iNum1 / iNum2) dRemainder = iNum1 - lQuotient * iNum2 Debug.Print lQuotient Debug.Print dRemainder End Sub |