diff --git a/cpp/leap/leap.h b/cpp/leap/leap.h new file mode 100644 index 0000000..1e4e2f3 --- /dev/null +++ b/cpp/leap/leap.h @@ -0,0 +1,12 @@ +#pragma once + +#define EXERCISM_RUN_ALL_TESTS + +namespace leap { + +inline bool is_leap_year(int year) +{ + return !(year % 4) && ((year % 100) || !(year % 400)); +} + +}