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);
ValidateIsraeliId
bool ValidateIsraeliId(const int id)
Validate a 9-digit Israeli ID number according to the Luhn algorithm.
Definition:
ValidateId.c:4
SumOfDigits
int SumOfDigits(int number)
Compute the sum of the digits in a number.
Definition:
ValidateId.c:31
Exercise01
Ex01.05
ValidateId.h
Generated by
1.9.1