0

How does it comes 1.25℅0.5=0.25??

but when we divide them we get only 2.5 what is the steps involved in it??

13th Feb 2017, 1:41 PM
hackey
hackey - avatar
2 Antworten
+ 1
When modulus(%) operator is applied on double or float numbers, then the operation would be as if it is integer division only. So here in this example 1.25%0.5 = 0.5*2 + 0.25. So remainder is 0.25
13th Feb 2017, 2:17 PM
Kommoju Sunil Kumar
Kommoju Sunil Kumar - avatar
0
ok bro thanks
13th Feb 2017, 2:28 PM
hackey
hackey - avatar