Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Five-weekends/Seed7/five-weekends.seed7
Normal file
18
Task/Five-weekends/Seed7/five-weekends.seed7
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
$ include "seed7_05.s7i";
|
||||
include "time.s7i";
|
||||
|
||||
const proc: main is func
|
||||
local
|
||||
var integer: months is 0;
|
||||
var time: firstDayInMonth is time.value;
|
||||
begin
|
||||
for firstDayInMonth.year range 1900 to 2100 do
|
||||
for firstDayInMonth.month range 1 to 12 do
|
||||
if daysInMonth(firstDayInMonth) = 31 and dayOfWeek(firstDayInMonth) = 5 then
|
||||
writeln(firstDayInMonth.year <& "-" <& firstDayInMonth.month lpad0 2);
|
||||
incr(months);
|
||||
end if;
|
||||
end for;
|
||||
end for;
|
||||
writeln("Number of months:" <& months);
|
||||
end func;
|
||||
Loading…
Add table
Add a link
Reference in a new issue