bob bob - 4 months ago 30 Question checking if a number is a mutliple of another number

I need to check if a number is a multiple of another number. So I can output a certain string or do a certain function. Is there a simple way or easy way of doing this.


The "modulus" or "mod" operator gives you the remainder of a division operation. So if the remainder is 0, then you know the numbers are multiples. This is also used for determining if numbers are odd or even. Simply do a mod (%) with 2, and if the answer is 0 then it's even, and 1 it's odd