Leap year and symbol used

141 Views Asked by At

How do I determine numbers divisible by 4? I'm trying to apply a leap year. I see a lot of solutions that show a '%' symbol. What does it mean?

1

There are 1 best solutions below

0
emeraldsanto On

To check if a number x is divisible by any other number y, you can use the modulo operator to get the remainder of the division (it should be 0).

x % y == 0