Archived

This topic is now archived and is closed to further replies.

Fella

What is MOD?

Recommended Posts

Fella    102
Ok, so mod is left over. 12 mod 7 = 5; 7*1 + 5 But I don''t understand why 1 mod 4 = 1. Can someone explain me why is this?

Share this post


Link to post
Share on other sites
RomSteady    248
Mod is the remainder after integer division.

12 / 7 = 1 rem 5, meaning you can divide 7 into 12 once, and have 5 left over. So, in this example, 5 would be the Mod.

1 / 4 = 0 mod 1, meaning you can divide 4 into 1 no times, so you would have 1 left over.

RomSteady - I play games for a living.

Share this post


Link to post
Share on other sites