D
D
Deb4ik2021-06-17 14:34:42
Python
Deb4ik, 2021-06-17 14:34:42

Why is 3696% 20 = 16 and not 8?

In short, such a topic, I need the remainder of division by 20, I write as it should , but for some reason I have 3696 when divided by 20, the remainder writes 16, not 8. What should I do? i % 20

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-06-17
@Deb4ik

Why 8?
3696//20 = 184 whole parts
184 * 20= 3680
3696 - 3680 = 16
What you got is 184.8, then these 8 tenths will not be the remainder, because they still need to be multiplied by 20 (just like 184 needs to be multiplied by 20), and 0.8 * 20 = 16

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question