0

# Modulo and floor division?

Could somebody explain it to me I’m 14 and I don’t think we learn modulo in Australia. I’ve never hear of either of these things.

3 ответов

+ 2

You definitely know about division and how it was done in elementary school.
For example to calculate 7/2 you have to look how many 2's fit in there. Obviously 3, because 3*2=6 but 4*2 = 8, which is too much.
However, there is still some rest. 7 = 3*2 +1
And this rest is the result for 7%2.
Therefore modulo is just a compact way to note it down.
Floor division is much simpler. Everything after the decimal point is just cropped.
3.213 -> 3
3.817 -> 3
(mostly done for integer division)
Ceil would be the other way round
3.213 -> 4
3.817 -> 4
And normal round
3.213 -> 3
3.817 -> 4

+ 3

modulo is the remainder from division. say 5/2 = 2.5, 5%2 = 1

+ 2

floor division is if you say 5/2, instead of saying 2.5 is the answer you say 2. because you round it down to the nearest integer. or number without decimals