Home / Questions / What is the difference between / and % operator?
Explanatory Question

What is the difference between / and % operator?

👁 104 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

Difference between / and % operator:

  • /: Division operator, used to divide two numbers and return the quotient. Example: 10 / 3 = 3.
  • %: Modulus operator, used to divide two numbers and return the remainder. Example: 10 % 3 = 1.
What is the difference between / and % operator?
Figure: What is the difference between / and % operator?