+ 2
What is the purpose for using a modulo operator in qoutient and reminder? How is it worked out?
1.25 % 0.5= 0.25
2 ответов
+ 9
sometimes you might want to know
if a certin variable is odd or even. You can use the modulo (%) operator then check value of remainder,
remainder =0 Even
other than =0 Odd
+ 5
modulo operator returns the remainder obtained as the result of a division operation.
1.25 = 2(0.5) + 0.25 meaning 2 is the quotient and 0.25 is the remainder.