0
how 1.25%0.5=0.25
4 ответов
+ 7
1.25 is 0.5*2 + 0.25 (and 0<=0.25<0.5).
+ 5
modulous ("%") gives you the remaining part of the indivisible part of division ("/").
so if we take 0.5*3, that equals 1.5- too much, that's bigger then 1.25. So we'll take 0.5*2-that gives us 1 which is the biggest divisible number in 1.25 that leaves no remaining indivible part. we'll take 1.25-1 and we'll get 0.25- that is the remaining part needed to divide 1.25 by 0.5 completely.
Hope I helped :)
+ 1
% means the remaining part. That means, if you divide 20 by 6 like- 20/6 , you got the result 3 and remainder 2. In the same way solving the mentioned question , you got 0.25. in the question there only asked what the remainder is.
0
using this % gives you the remainder not the dividend