Luhn Algorithm "Credit Card Validator"

Mar 24, 2016 at 6:58am
*
Last edited on Mar 24, 2016 at 10:10pm
Mar 24, 2016 at 9:42am
I cannot get it to provide a correct valid credit card number.
You create a card number from a random digits. Would you expect this set of random digits to pass your validation?

You could make your validation function do just validation, then you can call it in a loop with your generator function to ensure that only a valid random set is returned. I have no idea how likely it is to take.
Topic archived. No new replies allowed.