| about | help | code help+videos | done | prefs |
An ISBN has thirteen digits. The first twelve identify the country in which the book was printed, the publisher, and the individual book. The thirteenth digit is the "check digit." It is chosen in such a way that (d1 + 3d2 + d3 + 3d4 + ... + d11 + 3d12 + d13) mod 10 = 0 where d1, d2, d3..., d13 are digits of the ISBN. mod stands for modulo division (same as % in Java for non-negative dividends). Write a method: isValidISBN(9781245617412) → false isValidISBN(9781604596908) → true isValidISBN(8580001040332) → true ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 50 Post-solution available
Copyright Nick Parlante 2017 - privacy