wes d2a2ba9e15 first commit | пре 4 година | |
---|---|---|
.. | ||
README.md | пре 4 година | |
code.cpp | пре 4 година | |
unitTest.cpp | пре 4 година |
by Helen Yu tags: arrays, validation, language_fundamentals
Write a function to check if an array contains a particular number. Examples check([1, 2, 3, 4, 5], 3) ➞ true check([1, 1, 2, 1, 1], 3) ➞ false check([5, 5, 5, 6], 5) ➞ true check([], 5) ➞ false Notes Don't forget to return the result. If you get stuck on a challenge, find help in the Resources tab. If you're really stuck, unlock solutions in the Solution
Write a function to check if an array contains a particular number.
check([1, 2, 3, 4, 5], 3) ➞ true
check([1, 1, 2, 1, 1], 3) ➞ false
check([5, 5, 5, 6], 5) ➞ true
check([], 5) ➞ false
return
the result.