Intern — Middle
Processing of even and odd numbers
livecode
Task condition
The function takes two integers a and b.
- If both numbers are even, the function returns their product.
- If both numbers are odd, the function returns their sum.
- If one number is even and the other is odd, the function returns an odd number.