Already did some research in the web with google.
But informations about batch and mathematical operations are very rarely.
I guess you can do that by using the modulo operator but I didnt figure out the correct syntax and
how to use this operator to solve my requirement!
thanks in advance,
mulata
if ( myInteger % 2 == 0 )
{
// Even
}
else
{
// Odd
}
Or, in VB:
if (myIntegermod 2) = 0 then
'even
else
'odd
end if
0 comments:
Post a Comment