Multiples of a number

Blitz3D Forums/Blitz3D Programming/Multiples of a number

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

I've never used Mod before. I have no clue how it works.


That's what the help files are for.


Basically, this will divide your number as many times as possible by the divisor, then return you the remaining amount.


Ergo:

26/5

1*5=5, 2*5=10, 3*5=15, 4*5=20, 5*5=25, 1 LEFT OVER, so return that.

Print 26 Mod 5