Skip to content

Commit af2341d

Browse files
updated the ISBN description for additonal clarity (#1980)
* updated the ISBN descreption for additonal clarity * Corrected the example to proper markdown formatting and changed the digits in the first example to 'd' * Update exercises/isbn-verifier/description.md Went back to the text block Co-authored-by: Sascha Mann <[email protected]> * Update exercises/isbn-verifier/description.md Co-authored-by: Sascha Mann <[email protected]> * Update description.md * Updated description.md to pass the linter. Co-authored-by: Sascha Mann <[email protected]>
1 parent 4519fe1 commit af2341d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exercises/isbn-verifier/description.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ numbers. These normally contain dashes and look like: `3-598-21508-8`
88
The ISBN-10 format is 9 digits (0 to 9) plus one check character (either a digit or an X only). In the case the check character is an X, this represents the value '10'. These may be communicated with or without hyphens, and can be checked for their validity by the following formula:
99

1010
```text
11-
(x1 * 10 + x2 * 9 + x3 * 8 + x4 * 7 + x5 * 6 + x6 * 5 + x7 * 4 + x8 * 3 + x9 * 2 + x10 * 1) mod 11 == 0
11+
(d₁ * 10 + d₂ * 9 + d₃ * 8 + d₄ * 7 + d₅ * 6 + d₆ * 5 + d₇ * 4 + d₈ * 3 + d₉ * 2 + d₁₀ * 1) mod 11 == 0
1212
```
1313

1414
If the result is 0, then it is a valid ISBN-10, otherwise it is invalid.

0 commit comments

Comments
 (0)