https://github.com/trox25/visa-mastercard-americanexpress
C program that validates credit card numbers and identifies the type of card based on known number patterns and Luhn’s Algorithm
https://github.com/trox25/visa-mastercard-americanexpress
c luhn-algorithm
Last synced: 11 months ago
JSON representation
C program that validates credit card numbers and identifies the type of card based on known number patterns and Luhn’s Algorithm
- Host: GitHub
- URL: https://github.com/trox25/visa-mastercard-americanexpress
- Owner: TROX25
- License: mit
- Created: 2025-06-15T12:16:28.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-06-15T12:20:09.000Z (12 months ago)
- Last Synced: 2025-06-24T05:06:56.462Z (12 months ago)
- Topics: c, luhn-algorithm
- Language: C
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Visa-Mastercard-AmericanExpress
This is a simple C program that validates credit card numbers and identifies the type of card based on known number patterns and Luhn’s Algorithm.
Supported card types:
- 💳 Visa
- 💳 Mastercard
- 💳 American Express
## 🔍 How It Works
- Prompts the user to enter a credit card number.
- Applies **Luhn’s Algorithm** to validate the number.
- Checks the **length** and **starting digits** to determine the card issuer.
- Prints one of the following results:
- `VISA`
- `MASTERCARD`
- `AMEX`
- `INVALID`
## 💻 Example
Number: 378282246310005
AMEX