...

/

Solution: Writing a switch Statement

Solution: Writing a switch Statement

Review the solution of implementing conditional logic using the switch statement.

We'll cover the following...

Task 1 solution

Here’s a step-by-step solution to complete the missing code in the provided switch statements:

  1. First, we want to check if num is divisible by 5. We already have the check for that in line 6. In the provided switch statement, the code is checking if the remainder of num divided by 5 is equal to 0. The % symbol is the modulo operator, which returns the remainder of a division operation. So, ...