Content deleted Content added
→Remove all implementation examples: fix grammar |
→Ruby Solution: two bug fixes: right-to-left; each_with_index seems to start with the index 0, not 1 |
||
Line 214:
def luhn10?(number)
checksum = 0
digits = split_integer(number).reverse
digits.each_with_index do |d,i|
checksum += i % 2 ==
end
(checksum % 10) == 0
Line 231:
end
</source>
{{unsigned}}
Bug fixes. [[User:Boud|Boud]] ([[User talk:Boud|talk]]) 21:23, 24 February 2015 (UTC)
== description incorrect 4/17/2013 ==
|