Computer Science, asked by Navyasri98, 2 months ago

how the modulo % operator works with floating numbers in java​

Answers

Answered by preetisinghkrishna
1

Answer:

Modulo Operator is one of the fundamental operators in Java. It's a binary operator i.e. it requires two operands. In a division operation, the remainder is returned by using modulo operator. It is denoted by % (percentage) sign. For example 5%2 will return 1 because if you divide 5 with 2, the remainder will be 1. For a programmer it's very important to know how to use this operator, they are very important to build logic. For example, in many cases like reversing a number or checking if a number is a palindrome, you can use modulus operator with 10 to get the last digit,

Hopefully it will help you

Similar questions