• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

12 mod 5 = 2???

Status
Not open for further replies.
Level 2
Joined
Oct 13, 2004
Messages
13
eh?

What's your question?

12 mod 5 = 2 - thats correct...

12 mod 2 = 0 ..

12 mod 7 = 5 ..

and so on...
 
Level 2
Joined
Oct 1, 2004
Messages
15
Ok kids time for a math lesson. :D

12 MOD 5 = 2

Reason for this is divide 12 by 5 as much as you can. The result of 2 is its remainder.
 
Level 17
Joined
Sep 29, 2003
Messages
580
yes

As DarkShadow already sayed

12 modulo 5 = 2

means

12 / 5 = 2.4

now you take the integer value of the solution (2.4 = 2)

now you calc the opposite: 2 * 5 = 10
now you see theres a difference of 2 between 12 and 10 (12 - 10 = 2)

so whats 18 mod 7?

18 / 7 = 2.571428571428572

so 2 * 7 = 14 (the 2 comes from 2.571428571428572)

and 18 - 14 = 4

so 18 mod 7 = 4
 
Status
Not open for further replies.
Top