Luhn's Algorithm

Using C to Identify Valid Credit Card Numbers

Koowoy
Problem Create a program that uses Luhn’s Algorithm to identify if the input number is a valid credit card number for AMEX, MASTERCARD, and VISA. Breaking Down the Problem Basic Characteristics of Credit Card Numbers 1. The numbers have specific **digits** (AMEX: 15, MASTER: 16, VISA: 13 or 16 ) 2. The **first two digits** of the number are also specific (AMEX: 34 or 37, MASTER: 51~55, VISA: 40~49) Luhn’s Algorithm Not only does the number have to fit the requirements above, it also needs to be validated through Luhn’s Algorithm which is as follows: