Even or Odd Function, Run a number to see if its Even or odd. TIDY
Even or Odd Function, Run a number to see if its Even or odd. TIDY
API Declarations
'Call it like
'Msgbox evenodd("65")
'or msgbox evenodd(text1.text)
Rate Even or Odd Function, Run a number to see if its Even or odd. TIDY
(2(2 Vote))
Dim theintr, i, intlen As Double
theintr = thestring / 2
intlen = Len(theintr)
i = 1
For it = 1 To intlen
If Mid(theintr, i, 1) = "." Then
evenodd = "ODD"
Else
i = i + 1
evenodd = "EVEN"
End If
Next it
End Function
Even or Odd Function, Run a number to see if its Even or odd. TIDY Comments
No comments yet — be the first to post one!
Post a Comment