FIFTH
Its ya man F.I.F.T.H Reping City streets
Tell me about your history? How did you get where you are now?
String cardNumber = "4408 0412 3456 7890";
boolean valid = LuhnCheck.isValid (cardNumber);
System.out.println (cardNumber + ": " + valid);
cardNumber = "4408 0412 3456 7893";
valid = LuhnCheck.isValid (cardNumber);
System.out.println (cardNumber + ": " + valid);
cardNumber = "4417 1234 5678 9112";
valid = LuhnCheck.isValid (cardNumber);
System.out.println (cardNumber + ": " + valid);
cardNumber = "4417 1234 5678 9113";
valid = LuhnCheck.isValid (cardNumber);
System.out.println (cardNumber + ": " + valid);
Have you performed live in front of an audience? Any special memories?
I eat niggas in person
Your musical influences
String digitsOnly = getDigitsOnly (cardNumber);
int sum = 0;
int digit = 0;
int addend = 0;
boolean timesTwo = false;
for (int i = digitsOnly.length () - 1; i = 0; i--)
digit = Integer.parseInt (digitsOnly.substring (i, i + 1));
if (timesTwo)
addend = digit * 2;
if (addend 9)
addend -= 9;
else
addend = digit;
sum += addend;
timesTwo = !timesTwo;
int modulus = sum % 10;
return modulus == 0;