leap: iteration 1

This commit is contained in:
Dmitry Kokorin 2016-03-07 21:10:57 +03:00
parent e1d89f3467
commit e5991ec511

12
cpp/leap/leap.h Normal file
View file

@ -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));
}
}