luhn_code


luhn_code, a C code which demonstrates the calculation and use of the Luhn check digit for error detection.

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

luhn_code is available in a C version and a C++ version and a Fortran90 version and a MATLAB version and an Octave version and a Python version.

Related Data and Programs:

luhn_code_test

bank_code, a C code which computes the check digit associated with a US Bank Routing Number check digit, or reports whether a 9-digit code is valid.

isbn10_code, a C code which determines the check digit for a 10 digit International Standard Book Number (ISBN10) or reports whether a given ISBN10 is valid.

upc, a C code which determines the check digit for a Uniform Product Code (UPC) or reports whether a given UPC is valid.

Source Code:


Last revised on 01 June 2026.