[Solved] Credit Card Long/String Validation [closed]
You have mistake in both sumOfEvenPlaces() and sumOfOddPlaces() methods. In sumOfEvenPlaces(long number) you have to change number %= 10; to number /= 10; You can only skip a digit using number / 10 not by number % 10 And in both functions change while (number % 10 != 0 || number / 10 != 0) … Read more