The Modulo Operator

Okay so im doing some problems that involve the modulo operator. I get it but I would like someone to explain a specific problem for me.
24%10= The answer is 4 BECAUSE THE REMAINDER IS 4.
50%50= The answer is 0 BECAUSE THE REMAINDER 0.
78%10= The answer is 8 BECAUSE THE REMAINDER IS 8.
So how in the world is 12%5=2? The answer is 2.4 meaning the answer should be 4. Im also a rookie to c++ so there is a possibility that im missing something simple. Thanks
Does this help to make sense?

24 = (2 * 10) + 4
50 = (1 * 50) + 0
78 = (7 * 10) + 8
12 = (2 * 5) + 2

1
2
3
4
   2 
5)12
  10
   2 (modulo)
Last edited on
Ohhh i get it, i did it the same way you did for the other problems i pointed out and they gave me the same answer. Thanks wildblue.
Topic archived. No new replies allowed.