Hamdan-Maharoof / Test8_infs3203

Repository used in INFS3203 course
0 stars 0 forks source link

The modulus operation in the Calculator class cannot have the divisor set to zero. #6

Open mazinthaj opened 7 months ago

mazinthaj commented 7 months ago

Steps to Reproduce

  1. Run the provided calculator program.
  2. Choose the operation "modulo."
  3. Enter a number and assign zero as the value for the second number.

Expected Result When selecting the modulus operation, the program should calculate the remainder of dividing the first number and second number, where if the second number is zero it should return "cannot be divided by zero."

Actual Result The modulo method is giving the correct answer except when the devisor is zero, it gives an error.

image