C Workshop
ValidateId.h
Go to the documentation of this file.
1 #pragma once
2 #include <stdbool.h>
3 
11 static const int ID_MAX_LENGTH = 9;
12 
20 bool ValidateIsraeliId(const int id);
21 
28 int SumOfDigits(int number);
bool ValidateIsraeliId(const int id)
Validate a 9-digit Israeli ID number according to the Luhn algorithm.
Definition: ValidateId.c:4
int SumOfDigits(int number)
Compute the sum of the digits in a number.
Definition: ValidateId.c:31