Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C ++ Program 7 Create pseudocode or flowchart for the following problem. Then code a CH+ program and test it. Submit your .cpp file and

C ++
image text in transcribed
Program 7 Create pseudocode or flowchart for the following problem. Then code a CH+ program and test it. Submit your .cpp file and your flowchart or pseudocode file to this assignment. *"6.37 (Financiali credit cand number vatidation) Credit card numbers follow certain pattems. A credit card number must have between 13 and 16 digits. The number must start with the following: - 4 for Visa cards - 5 for MasterCard cards - 37 for American Express cards - 6 for Discover ards In 1954, Hans Luhn of IBM proposed an algorithm for validating credit card numbers. The algorithm is useful to determine whether a card number is entered correctly or is scanned correctly by a scanner. Almost all credit card numbers are generated following this validity check, commonly known as the Luhn check or the Mod 10 check. It can be described as follows. (For Illustration, consider the card number 4388576018402626 .) 1. Double eveny second digit from right to Lett. If doubling of a digit renula in a two -digit numbet, add the two digits to get a single digit number. 2. Now add al alngle dicit numbers from 5 tep 1 . 4+4+8+2+3+1+7+8=37 3. Add all cigits in the odd places from right to left in the card number- 6+6+0+8+0+7+8+3=35 4. Sam the remilts from step2 and step 3 . 37+36=75 5. If the renult from Step is is divieible by 20 , the card number is valid; otherwile, it is invalid. For example, the number 639552620402826 is invalid, but the number 43 esteote410707 ie valid

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server Query Performance Tuning

Authors: Sajal Dam, Grant Fritchey

4th Edition

1430267429, 9781430267423

More Books

Students also viewed these Databases questions