Cody

Problem 45486. Check Digit - 01

Solution 2246580

Submitted on 30 Apr 2020 by Yuan
  • Size: 36
  • This is the leading solution.
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!