Guest User

Untitled

a guest
May 28th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.08 KB | None | 0 0
  1. def luhn? n;s=0;n.size.times{|i|x=n[-(i+1),1].to_i*(i%2+1);s+=x>9?x+1:x};s%10==0;end
Add Comment
Please, Sign In to add comment