How To Check A Valid Credit Card Number
Say we have
38520000023237 and we want to check if it could be a real credit card number- Take the last digit
7. This is our check digit - Take the rest of the sequence
3852000002323 - Double every other digit starting from the right
6,8,10,2,0,0,0,0,0,2,6,2,6 - Sum the digits of the products
10 = 1 + 0 = 1 - Add all the digits together
6+8+1+2+0+0+0+0+0+2+6+2+6 = 33 - Multiply the result by 9
33 * 9 = 297 - Take the last digit of the result
7. If this matches the check digit we have a valid sequence - Since our check digit
7matches our result7, we conclude that this sequence would be a valid credit card number!





0 comments:
Post a Comment