HF RL Explorer

card number checksums: implement stub

card number checksums: implement stub: a task in smol-software-harbor (Harbor dataset). luhn valid() in src/luhn.c is a stub. Implement the Luhn checksum as described in src/luhn.h : spaces are ignored, any other non-digit makes the number invalid, and fewer than two digits is invalid. Starting…

The task

`luhn_valid()` in `src/luhn.c` is a stub. Implement the Luhn checksum as described in `src/luhn.h`: spaces are ignored, any other non-digit makes the number invalid, and fewer than two digits is invalid. Starting from the rightmost digit, double every second digit (subtract 9 if the result is above 9); the number is…

Part of efederici/smol-software-harbor.