0
1,25 % 0,5 = 0,25 ???
Can somebody tell me why ???
8 Respuestas
+ 3
use // to get the quotient.
use % to get the remainder.
+ 2
1.25 = 2*0.5 + 0.25
% is the operator to get the remainder. 1.25 divided by 0.5 is 2. The remainder is 0.25
+ 2
yes, you got it!
but
17//3=5
17%3=2
+ 1
I think I understand it now. Thanks
+ 1
Ok Thanks. I got it now ;-P
0
so 17%3 = 5*3 +2 ???
0
Description is incorrect i think:
1.25 divided by 0.5 is 2.5 and simple
remainder must be 0.5.
Actually % shows the undivided remainder of integer division:
9%3=0
10%3=1
11%3=2
11.9%3=2.9
12%3=0
0
Что значит остаток числа 1.25? Как получается, что остаток 1.25/0.5=0.25?