modulo operator remainder ? whats this ill its want a remainder 2 so i types 10/5 this will give 2 but this exp is wrong !!!

Modulo is different from division. Modulo gives just the remainder.

10 / 5 gives 2

10 % 5 gives 0

how is there any formula for obtaining remainder ???

Iām not really sure what you mean by that.

You can read the technical details of modulo here.

1 Like

i used 18 % 8; dont forget the ; or it wont go

2 Likes

7 % 5 gives 2

10 % 5 gives 0

Thank you!!! That helped a lot. I just needed to add the ;