Content deleted Content added
Man in South (talk | contribs) →Uses: Added usage |
|||
Line 123:
=== [[C Sharp (programming language)|C#]] ===
<syntaxhighlight lang="c#" line="1">
bool IsValidLuhn(in int[1] digits)
{
int check_digit = 0;
Line 129:
check_digit += ((i & 1) is 0) switch
{
true => digits[
false => digits[
};
|