I dont get it, how is the remainder of 1.25 % 0.5 being 0.25 instead of 0.5? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

I dont get it, how is the remainder of 1.25 % 0.5 being 0.25 instead of 0.5?

6th Dec 2017, 10:42 AM
Isaac Mbugua
Isaac Mbugua - avatar
2 Answers
+ 1
You divide the first number by the second number and the remainder is rest which cannot be divided by the second number without getting a fraction. Example: 1.25 / 0.5 = 2 * 0.5 + 0.25
6th Dec 2017, 11:15 AM
Stefan
+ 1
thanks guys. got it.
6th Dec 2017, 12:17 PM
Isaac Mbugua
Isaac Mbugua - avatar