You're designing a calendar application and need to determine if a year is a leap year. Leap years are divisible by 4 but not divisible by 100 unless they are also divisible by 400. Which arithmetic operators are crucial for this determination? 

  • + and - 
  • * and / 
  • % and == 
  • > and <
To determine if a year is a leap year, we need to check if the year is divisible by certain numbers. The modulus operator (%) gives the remainder of a division and can be used to check for divisibility. The equality operator (==) is used to check if the remainder is zero. Hence, the combination of % and == is crucial to check the divisibility conditions required to determine a leap year.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *