Skip to main content
6 events
when toggle format what by license comment
Dec 9, 2018 at 19:07 comment added user22842 Okay I changed the 'int first_digit = digits / 10;' to 'int first_digit = m / pow(10, (digits - 1));' and the 'int first_two_digits = digits / 100;' to 'int first_two_digits = m / pow(10, (digits - 2));' and it worked. m is equal to cc_number a. Thanks for your help :)
Dec 9, 2018 at 19:03 vote accept CommunityBot
Dec 9, 2018 at 18:47 comment added DinoCoderSaurus Sorry if I wasn't clear. Clarification added to answer.
Dec 9, 2018 at 18:47 history edited DinoCoderSaurus CC BY-SA 4.0
clarification
Dec 9, 2018 at 18:34 comment added user22842 The user doesn't enter 13, 15, or 16 followed up by numbers. Instead, the user types a number that can start with any two digits not just the ones referenced above.
Dec 9, 2018 at 18:27 history answered DinoCoderSaurus CC BY-SA 4.0