Question: Write a function called isEven() that uses the remainder (modulus) operator (%) to determine when an integer is even. The function should take an integer
Write a function called isEven() that uses the remainder (modulus) operator (%) to determine when an integer is even. The function should take an integer argument called myNumber passed from within the for loop and return true if the integer is even and false otherwise. Your program should determine what numbers are even and odd from 1 to 20 using the isEven() function. Your counter variable in the for loop should be called num.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
