add sources

This commit is contained in:
Alexander Zhirov 2023-02-26 01:19:12 +03:00
parent fcd25eea52
commit 7ce631a648
21 changed files with 548 additions and 2 deletions

View file

@ -0,0 +1,16 @@
import std.stdio;
pure bool leapYear(uint y)
{
return (y % 4) == 0 && (y % 100 || (y % 400) == 0);
}
pure uint daysInYear(uint y)
{
return 365 + leapYear(y);
}
void main()
{
writeln(daysInYear(2022));
}