Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

sailenroute

  • 3 years ago

What does '%' do?

  • This Question is Open
  1. A.Avinash_Goutham
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 2

    gives the remainder 5%2=1 4%2=0

  2. sailenroute
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    oh, thanks alot man

  3. time_to_learn
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    It is called the modulo operator. Given two positive numbers, a (the dividend) and n (the divisor), a modulo n (abbreviated as a mod n) is the remainder of the Euclidean division of a by n. For instance, the expression "5 mod 2" would evaluate to 1 because 5 divided by 2 leaves a quotient of 2 and a remainder of 1, while "9 mod 3" would evaluate to 0 because the division of 9 by 3 has a quotient of 3 and leaves a remainder of 0; there is nothing to subtract from 9 after multiplying 3 times 3. (Notice that doing the division with a calculator won't show you the result referred to here by this operation, the quotient will be expressed as a decimal fraction.) Source: http://en.wikipedia.org/wiki/Modulo_operation

  4. Krishnadas
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    this id the modulus operator..This gives remainder..not to be confused with '/'.

  5. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy