Skip to content

Instantly share code, notes, and snippets.

Luhn Checksum

Implement a Ruby program that outputs the validity of a number by applying the Luhn Checksum.

http://en.wikipedia.org/wiki/Luhn_algorithm

Please treat this as you would any other task you'd encounter during your daily work. This will show us how currently code, and not how you coded 6, 12 or 18 months ago. Your code should also be suitably tested. Also, please do not feel that you need to spend a great deal of time working on a solution.

There are many solutions and code snippets online to do a Luhn Checksum. Please resist using those.