Tags | skill/problem_solving |
Hard Prerequisites | |
IMPORTANT: Please review these prerequisites, they include important information that will help you with this content. | |
|
Write a function that takes in three numbers(integers) and returns the maximum number.
Do this without using any built-in methods. Write your own logic from scratch.
The function should expect 3 numbers(integers), not an array or list.
task5([1,2,3]) // BAD - this function accepts an array/list which is wrong
task5(1,2,3) // GOOD - this accepts three numbers just like we need it to.
Example usage:
task5(1,2,3)
should return 3
task5(-1,-2,-3)
should return -1
task5(2,2,2)
should return 2
>
or <
operators. What other comparison operators are there?