A problem must detail what needs to be done in its description. There is not only one way to do what's requested. You should probably add more test cases too, at least 5, to avoid lookup table solutions.
389 Solvers
Find nearest prime number less than input number
278 Solvers
Simple equation: Annual salary
3825 Solvers
Rotate a matrix for 180 degree
139 Solvers
136 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!