This repository contains implementations of a credit card checksum validation algorithm across multiple programming languages. The algorithm used is the Luhn algorithm, which is commonly employed to validate credit card numbers.
The Luhn algorithm (or "modulus 10" algorithm) is a simple checksum formula used to validate various identification numbers, especially credit card numbers. The algorithm works by:
- Doubling every second digit from the right (starting with the second-to-last digit) 🔢.
- Subtracting 9 from any result that is greater than 9 ✂️.
- Summing all the digits ➕.
- Checking if the total sum is divisible by 10 🔄.
- If the total sum is divisible by 10, the credit card number is considered valid ✅.
This repository includes implementations of the Luhn algorithm in the following programming languages:
- Python 🐍
- Java ☕
- C# 🔧
- JavaScript 💎
- Go 🚀
- Rust 🦀
Each implementation provides a function to validate a credit card number using the Luhn algorithm.
Contributions to improve or add new language implementations are welcome. Please feel free to submit pull requests or open issues if you encounter any problems or have suggestions for enhancements.