• EvokerKing@lemmy.world
    link
    fedilink
    arrow-up
    7
    arrow-down
    3
    ·
    1 year ago

    Explanation: the percent is modulus. Basically it’s just divide the first number by the second and return the remainder. If you do number % 2, it will return 1 if it is odd and 0 if it is even. For example 4/2 has a remainder of 0 and therefore is even. 3/2 has a remainder of 1, and therefore is odd.

    • TopRamenBinLaden@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      4
      ·
      edit-2
      1 year ago

      Sorry I should’ve put the /s. I was just playing. But thank you for the helpful explanation, nonetheless. You are a nice person.