Some credit card companies assign a special digit, called a check digit, to the end of each
Question:
Some credit card companies assign a special digit, called a check digit, to the end of each customer’s credit card number. Many methods for creating the check digit have been developed. One very simple method is to append the second digit in the credit card number to the end of the number. For example, if the first four characters in the credit card number are 1357, you would append the number 3 to the end of the number, making the credit card number 13573. If necessary, create a new project named Advanced33 Project and save it in the Cpp8\Chap13 folder. Also create a new source file named Advanced33.cpp. Write a program that prompts the user to enter a fivedigit credit card number, with the fifth digit being the check digit. Verify that the user entered exactly five numbers. If the user entered the required number of numbers, verify that the last number is the check digit. Display appropriate messages indicating whether the credit card number is valid or invalid. Use a sentinel value to end the program.
Save and then run the program. Test the program appropriately.
Step by Step Answer: