Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Objective: Understanding expressions Part B: C Programming Exercise a) Implement the algorithm as represented by isbn.rap, and write an equivalent An International Standard Book Number
Objective: Understanding expressions Part B: C Programming Exercise a) Implement the algorithm as represented by "isbn.rap", and write an equivalent An International Standard Book Number (ISBN) is a unique number assigned to each book. ISBN-13 has thirteen digits in 5 parts which the last digit is "check digit". The check digit is base ten, and can be 0-9. To compute a missing check digit, each digit, from thef to right, is alternatively multiplied by 1 or 3.Then, the sum of these products should be divided by 10 to find the remainder ranging from 0 to 9. Finally, the check digit can be found by subtracting the remainder from 10, that leaves a result from 1 to 10. C program that accomplishes what the flowchart does. The program, however, is allowed to call the scanf() function only once. A sample interaction is shown below: SBN 817525766-0 For example, take the ISBN 978-0-306-40615-? a) First calculate sum of products:917x3+8x10x3+3*1+0x3+6x14x3 0x1+6x31x1+5x3-93 b) Remainder upon dividing by 10 is 3 c) Remainder is subtracted from 10. d) Check digit is 7 (10-3) For more information, watch the following Youtube video about finding the missing check digit of an ISBN number: https://www.youtube.com/watch?v Wstij5CPqk Enter the first twelve digits of ISBN-13: 978030640615 Check digit: 7 Part A: RAPTOR Exercise b) Save your program to a file named "isbn.c" in the working directory on the PC a) Start RAPTOR and create a flowchart that asks the user to enter the first 12 digits of an ISBN-13, and displays the corresponding check digit. b) Run the flowchart with different numbers. c) Save the flowchart to a file named "isbn.rap in the working directory on the PC you are using c) Demonstrate the isbn.c file to GA/TAs and run with different input values. d) Hint: To read single digits, we'll use scanf with the %ld conversion specification you are using d) Demonstrate the isbn.rap file to GA/TAs and run with different input values
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