36899Re: [libertybasic] MOD
- Oct 9, 2008From the Helpfile:
num1 MOD num2
The MOD command returns the remainder when num1 is divided by num2.
'divide 15 by 4 and return the remainder
print 15 MOD 4
print 27 MOD 16
When 15 is divided by 4, the quotient is 3, with a remainder of 3. MOD returns that remainder. When 27 is divided by 16, the quotient is 1, with a remainder of 11. MOD returns that remainder.
[Non-text portions of this message have been removed]
- << Previous post in topic Next post in topic >>