How to resolve the algorithm Long year step by step in the zkl programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Long year step by step in the zkl programming language
Table of Contents
Problem Statement
Most years have 52 weeks, some have 53, according to ISO8601.
Write a function which determines if a given year is long (53 weeks) or not, and demonstrate it.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Long year step by step in the zkl programming language
Source code in the zkl programming language
fcn isLongYear(y){ Time.Date.weeksInYear(y)==53 }
foreach nm,y in (T(T("20th",1900), T("21st",2000), T("22nd",2100))){
println("\nLong years in the %s century:\n%s".fmt(nm,
[y..y+99].filter(isLongYear).concat(" ")));
}
You may also check:How to resolve the algorithm Greyscale bars/Display step by step in the EasyLang programming language
You may also check:How to resolve the algorithm Jaro similarity step by step in the Python programming language
You may also check:How to resolve the algorithm Non-continuous subsequences step by step in the F# programming language
You may also check:How to resolve the algorithm Soloway's recurring rainfall step by step in the ALGOL 68 programming language
You may also check:How to resolve the algorithm Empty program step by step in the Modula-2 programming language