Computer Science, asked by dskynjla, 5 months ago

3. Write the difference between / and %​

Answers

Answered by ashoksharmaucobank22
1

Explanation:

》 Both/ and % are two different operators used in Java. These operators are mathematical operators and both have different uses.

》/ Only perform the division operation in mathematics and returns results as the quotient, while % is known as modulus and returns results as the remaining part performed.

☆Here I will give you an example which you can easily understand.

☆10/2 output as 5 which is the quotient of the above division.

But 11%2 will give the output as 1, which is the remaining part of the above-performed modulus operation.

Similar questions