write a program , in this program you will contemplate check digit, the job of a
ID: 3530673 • Letter: W
Question
write a program , in this program you will contemplate check digit, the job of a check digit is to catch problems in transmitted numbers, for example they are used in bar codes and the international standard book number (ISBN) codes. this means if a bar code is read incorrectly by a digital reader the computer is aware of the error and then disregards the read as a bad scan. your task is to write a check digit generator and verifier , the check digit generator will generate a check digit for a four integer. the verifier will take in five digit number . compute the check digit of the first four leftmost digits and determine if the right most digit matches the computed check digit. for this program are required to use at least one if statement and one switch statement. in addition you are required to write the following function: * a function that will display a menu , like shown in my example runs, and prompt for an integer choice , this choice should be returned to the caller. *a function that takes a positive four digit number , as an integer and returns an integer , this function is responsible for computing the check digit , c, using the following process: c=(d1+3d2+7d3+9d4) (mod 10) where d1 is the leftmost digit and d4 is the right most digit. as part of writing this function you will have to break a number apart into its individual digits. note : you may not convert the number to a string. * a function that takes a positive five digit integer and returns a boolean. this function will determine if the check digit computed form the first four leftmost digits matches the rightmost digit , if the computed check digit matches the rightmost digit the function should return true otherwise false should be returned . hint : you should be able to call a function you wrote to compute the check digit. the main function should be responsible for calling the function to display the menu, the main function is also responsible for handling the selected option by calling the appropriate function to preform the requested operation, please note main should be prompting for the four or five digit integer as needed. the output should match this one if the user selects an invalid option : 1.'compute check digit 2. verify number please enter a choice :3 3 is an invalid option .. ( thank you so so much for your help .Explanation / Answer
Your pts are decreasing at .5 rate ... :/ https://www.dropbox.com/s/ys02jjfuzjpgdru/ISBNcheck.cpp.txt
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.