temp = x mod 250
if(temp<250/2)
res = x-temp
else
res = x + (250-temp)
mod is a standard arithmetic operator that returns the remainder of x
divided by y. not sure what the syntax is for VB in most other languages
it's % or 'mod'.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.