Cody

Problem 45486. Check Digit - 01

Solution 2898149

Submitted on 1 Sep 2020 by ChrisR
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
assert(isequal(ISBN_01('030640615'),2))

2   Pass
assert(isequal(ISBN_01('0306406152'),'invalid'))

3   Pass
assert(isequal(ISBN_01('014298118'),4))

4   Pass
assert(isequal(ISBN_01('014298115'),'X'))

5   Pass
assert(isequal(ISBN_01('85-359-0277'),5))

6   Pass
assert(isequal(ISBN_01('978-85-359-0277'),'invalid'))

Suggested Problems

More from this Author149

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!