Make a function that returns ‘odd’ if the input is odd, ‘even’ if the input if even or ‘error’ if the input is neither odd nor even. Where the input could be a number, letter or symbol.
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers53
Suggested Problems
-
Sum all integers from 1 to 2^n
17888 Solvers
-
Project Euler: Problem 6, Natural numbers, squares and sums.
2578 Solvers
-
Change the sign of even index entries of the reversed vector
657 Solvers
-
Reverse the elements of an array
1130 Solvers
-
Penny flipping - calculate winning probability (easy)
198 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!