Skip to content

saidathu-lalam/CreditCard-validation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

CreditCard-validation

A credit card number must have between 13 and 16 digits, and this can be checked by using Luhn algorithm. Steps involved in the Luhn algorithm Step 1 – Starting from the rightmost digit, double the value of every second digit,
Step 2 – If doubling of a number results in a two digit number then add the digits of the product to get a single digit number.
Step 3 – Now take the sum of all the digits.
Step 4 – If the total modulo 10 is equal to 0 (if the total ends in zero) then the number is valid according to the Luhn formula; else it is not valid.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages