why 1.25 % 0.5 is 0.25 | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 1

why 1.25 % 0.5 is 0.25

i dont get it

25th Nov 2016, 9:26 AM
Farazdak anugrah
Farazdak anugrah - avatar
13 Respuestas
+ 21
2 * 0.5 = 1 1.25 - 1 = 0.25 Basically very time you can try to get the closest to the first number (1.25) by multiplying the second (0.5) with another number (2) and then subtracting it from the first one (1.25) to get the answer. And by the way 1.25 / 0.5 = 2.5
25th Nov 2016, 9:55 AM
Evcheto Novakova
Evcheto Novakova - avatar
+ 6
2 * 0.5 = 1 so the remainder 1.25 - 1 = 0.25 good luck bro ‚̧
25th Nov 2016, 10:31 AM
Baraa AB
Baraa AB - avatar
+ 5
Its basic math. Just remember that % (modulo) is not same as / (divide) % will give you remainder after division. so 1.25/0.5 (devide by) will be give you 2 as dividend and 0.25 as remainder
25th Nov 2016, 9:45 AM
sajid
+ 3
You divide 1.25 with 0.5 and then obtain the remainder, that'll be your answer. So it goes, 1.25 / 0.5 = 2 (remainder: 0.25) '%' is a modulo operator that yields the remainder of a problem.
25th Nov 2016, 9:42 AM
Billy Noah
Billy Noah - avatar
+ 2
1.25 == (1.25//0.5)*0.5 + 1.25%0.5 == 2*0.5 + 0.25
25th Nov 2016, 9:42 AM
donkeyhot
donkeyhot - avatar
+ 1
1 % 2 = 1(1 - 0), 20 % 8 = 4(20-16)
19th Jun 2021, 1:34 AM
–Ē–∂–ł–ó–į–Ļ
–Ē–∂–ł–ó–į–Ļ - avatar
0
6%20 =2 is not this correct?
3rd Jul 2018, 1:00 AM
Abdulrahman O
Abdulrahman O - avatar
0
1.25 divided by 0.5 is 2 + the reminder of 0.25, then 1.25 % 0.5 = that reminder of 0.25
5th Jul 2018, 4:08 AM
Tierri Alexandre
Tierri Alexandre - avatar
0
why reminder is 0.25?
5th Jul 2018, 5:28 AM
Stanislav Tkachuk
Stanislav Tkachuk - avatar
0
>>>7%(5//2) =7%2 =1 above if you do 7/2 then you will get 3.5 Let's simple it if the ans is 3.5 then substract 2(quotient) from 7 ,3 times (7-2-2-2)=1.Thus above ans of >>>7%(5//2)=1 Apply same theory for the problem >>>1.25%.5 Here if we do 1.25/.5 we surely get 2.5. Now subtract the 0.5(quotient ) from 1.25 by 2 times(1.25-0.5-0.5)=0.25 .. Thus the real solution and perfect solution we get from modulo operation
9th Jul 2018, 4:34 AM
Surojit Bhandari
Surojit Bhandari - avatar
0
https://ru.wikipedia.org/wiki/–Ē–Ķ–Ľ–Ķ–Ĺ–ł–Ķ_—Ā_–ĺ—Ā—ā–į—ā–ļ–ĺ–ľ
6th Sep 2018, 12:29 PM
Vazgen
0
If you have 10 cookies and each kid gets 2 cookies, how many kids can you serve? It's 10√∑2=5 kids. If you have 10 cookies and each kid gets 2.5 cookies, how many kids can you serve? It's 10√∑2.5=4 kids. If you have 1 cookie and each kid gets 0.5 cookies, how many kids can you serve? It's 1√∑0.5=2 kids. what is left is the remainder 0.25
8th Jan 2022, 1:40 PM
Mustafa Mehrab
Mustafa Mehrab - avatar
- 3
did the math within my calculator and this is what came out: 0.00625
26th Nov 2016, 2:36 AM
Dregon
Dregon - avatar