CSCI 1300 - Programming Homework
Computing the ISBN Check Digit
Please Check Your Course Syllabus for Due Date

Computing ISBN Check Digits

The purpose of this assignment is to make sure that you know how to write a small program that reads some information, does a calculation, and prints results that are based on that calculation. For this particular program, the calculation must use the "modulo" operator. In addition, the student must do some research to find out the definition of an ISBN check digit.

For the assignment, start with some online research on the meaning of an International Standard Book Number (ISBN) check digit. Then write a program to compute check digits.

Input. The program asks for an ISBN in which the user has typed a question mark instead of the check digit. The number is typed on a single line of input with no spaces. It could be a 10-digit or a 13-digit ISBN, and it might include the dashes or it might omit them.

Output. The program then prints a message with the correct check digit.

Sample program run: with this information:

  Please type an ISBN with a question mark for the final digit.
  The check digit is 2.