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??
2 Answers
+ 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
0
ok bro thanks