Question: ISBN-13 is a new standard for indentifying books. It uses 13 digits d 1 d 2 d 3 d 4 d 5 d 6 d
ISBN-13 is a new standard for indentifying books. It uses 13 digits d1d2d3d4d5d6d7d8d9d10d11d12d13. The last digit d13 is a checksum, which is calculated from the other digits using the following formula:
![]()
If the checksum is 10, replace it with 0. Your program should read the input as a string. Here are sample runs:
![]()
10 (di + 3d, + dz + 3d4 + dz + 3d, + d, + 3dz + d, + 3d10 + d1 + 3d12)%10 Enter the first 12 digits of an ISBN-13 as a string: 978013213080 JEnter The ISBN-13 number is 9780132130806 Enter the first 12 digits of an ISBN-13 as a string: 978013213079 JEnter The ISBN-13 number is 9780132130790 Enter the first 12 digits of an ISBN-13 as a string: 97801320 JEnter 97801320 is an invalid input
Step by Step Solution
3.39 Rating (168 Votes )
There are 3 Steps involved in it
Program Plan 1 Create a class CheckISBN13 2 Declare and Initialize the variables int checksurn017 ch... View full answer
Get step-by-step solutions from verified subject matter experts
