Sub randomsub(ByRef num, ByVal max)
num = Rnd() * max
End Sub

That is my code, both num and max are integers.
Before it worked fine, but then I added an extra option to choose between additoon/subtraction/multiplication and i copied and pasted and changed the operator( + - x).

I want it to only randomize full integers not decimal point floats.

WHY IS IT GIVING ME THIS STUFF NOW?
http://img266.imageshack.us/img266/1913/rgesawfew.jpg
well this is in vb.net, not psuedocode, also max is defined as an integer same as num because i want they to be integers. I can easily change max to tempnum and it makes no difference.
FIXED!
Its okay... i just reverted back to my old programming style and made everything a global and for SOME WEIRD REASON it works...