My credit card checker

Hello, @bit2736304594, and welcome to the forums.

I ran your code. It returns valid3 as invalid.
It also returns mystery3 as valid, but it is an invalid number.

Hint:

Your code always starts at the beginning of the card number array, and doubles every other digit. The problem occurs when a card number has an odd number of digits.

1 Like

Thank you!!! I saw were I went wrong.

1 Like