+ 1
where did the 1.25 come from. i understand the floor division. the remainder should be 2. what does 1.25 have to do with anything?
3 Antworten
+ 2
1.25 = 0.5 +0.5 + 0.25
So, when 1.25 / 0.5 the integer part is 2 and the remains is 0.25
+ 1
1.25 % 0.5 is a completely separate operation.
Also, 20 % 6 is indeed 2.
+ 1
thank you!