Questions tagged [credit]
153 questions
3
votes
2
answers
13k
views
Finding the nth digit for credit card number
I'm having a hard time trying to find the 2nd to last digit of the user's credit card number, since that's the starting point for Luhn's algorithm. Is there a way to convert a long to an array and ...
3
votes
1
answer
379
views
Why Does credit Fail Passing check50 Tests?
When I input the credit card numbers that check50 inputs in its tests to my program myself, It correctly identifies the numbers as expected. However, when I run check50, it's not identifying correctly....
0
votes
3
answers
4k
views
How can I add alternate digits in credit.c?
I am currently trying to solve the hacker version of pset 1 (credit.c). I have successfully completed the rest of the psets (hacker and standard versions). I need to sum up the even (starting from 0) ...