Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Long-year/C-sharp/long-year.cs
Normal file
18
Task/Long-year/C-sharp/long-year.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using static System.Console;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Globalization;
|
||||
|
||||
public static class Program
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
WriteLine("Long years in the 21st century:");
|
||||
WriteLine(string.Join(" ", 2000.To(2100).Where(y => ISOWeek.GetWeeksInYear(y) == 53)));
|
||||
}
|
||||
|
||||
public static IEnumerable<int> To(this int start, int end) {
|
||||
for (int i = start; i < end; i++) yield return i;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue