Skip to content

CodeMaster7000/Credit_Card_Validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Credit_Card_Validator

About

A simple C++ program to validate credit card numbers, using Luhn's Algorithm.

Background Information

Luhn's algorithm determines whether or not a credit card number is valid. For a given credit card number:

  1. Double the value of every other digit from right to left, beginning with the penultimate digit.
  2. Add the digits of the results of Step 1 to the remaining digits in the credit card number.
    • If the result mod 10 is equal to 0, the number is valid.
    • If the result mod 10 is not equal to 0, the validation fails.

Implementation

Run the file named Credit_Card_Validator.cpp.

About

A simple C++ program to validate credit card numbers.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages