Heya guys.. i took a computer programming course at my school and here's our first homework.
My teacher gave us this code and for some reason i cnt figure it out why it keep saying "even".
Teachers Code:
Code:
input = textbox
if isNumeric(input)
if(input mod 2 = 0)
print:input is even
elseif(input mod 2 = -1) or (input mod 2 = 1)
print: input is odd
else
print: input is neither
else
print:input is non-numeric
My Verson:
Code:
Dim Input As Long
IsNumeric(Input)
If Input Mod 2 = 0 Then
MsgBox("Even")
ElseIf Input Mod 2 = -1 Or Input Mod 2 = 1 Then
MsgBox("Odd")
Else
MsgBox("Neither")
End If
Help Please.