Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program poniedzialki_1;
- const mies: array[1..12] of byte = (31,28,31,30,31,30,31,31,30,31,30,31);
- var r,d,t,i: integer;
- begin
- r := 2007;
- d := 1;
- t:=0;
- repeat
- for i:=1 to 12 do
- begin
- if (d mod 7 = 1) then
- begin
- writeln('1.',i,'.',r);
- inc(t);
- end;
- d := d + mies[i];
- if ((i = 2) and (r mod 4 = 0)) then inc(d);
- end;
- inc(r);
- until r = 2017;
- writeln('Ilosc poniedzialkow: ',t);
- readln;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement