Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Sample Output: Enter the first ISBN digit: 013293652 ISBN-10: 0-13-293652-6 Enter the first ISBN digit: 142140267 ISBN-10: 1-42-140267-X Enter a nine digit ISBN number: 1234567890
Sample Output: Enter the first ISBN digit: 013293652 ISBN-10: 0-13-293652-6 Enter the first ISBN digit: 142140267 ISBN-10: 1-42-140267-X Enter a nine digit ISBN number: 1234567890 Error, ISBN must be exactly 9 digits S> Problem Statement An ISBN (International Standard Book Number) consists of 10 digits: di d2 ds d4 ds de d7 dgdg d1o The last digit d1o is a checksum, which is calculated from the other nine digits using the following formula(d 1+ where mod is short for modulus. If the checksum is 10, then the last digit is denoted X according to the ISBN convention. Any other number (i.e., 1 through 9) is the same number. Write a program that prompts the user to enter the first 9 digits of an ISBN and then displays the 10-digit ISBN (including leading zeroes). Input Data nine digits of ISBN, character string Output Data The 10 digit ISBN, correctly formatted as di - dzds- dadsdedzdsds-d1
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started