UNIX Free Pascal


.. - 2


9:begin writeln('');

kdm:=30;

if v then kd:=244 else kd:=243;

end;

10:begin writeln('');

kdm:=31;

if v then kd:=274 else kd:=273;

end;

11:begin writeln('');

kdm:=30;

if v then kd:=305 else kd:=304;

end;

12:begin writeln('');

kdm:=31;

if v then kd:=335 else kd:=334;

end;

end;

arr[0,1]:='';

arr[0,2]:='';

arr[0,3]:='';

arr[0,4]:='';

arr[0,5]:='';

arr[0,6]:='';

arr[0,7]:='';

pol_1:=(pol_1+kd) mod 7;

k:=pol_1+1;

n:=1;

for j:=k to 7 do

begin

str(n,s);

arr[1,j]:=s;

n:=n+1;

end;

for i:=2 to 7 do

for j:=1 to 7 do

begin

if n<=kdm then begin //n:=n+1;

str(n,s);

n:=n+1;

end

else s:=' ';

arr[i,j]:=s;

end;

for i:=0 to 7 do

begin

for j:=1 to 7 do

write(arr[i,j]:2,' ');

writeln;

end;

end;

 

var

y,m,mm,d,dw:word;

kvy,kd:longint;

err:integer;

ii,jj,x1,x2,y1,y2:byte;

begin

m:=0;

if paramcount=0 then getdate(y,m,d,dw);

if paramcount=1 then val(paramstr(1),y,err);

if paramcount=2 then begin

val(paramstr(1),y,err);

val(paramstr(2),m,err);

end;

if err<>0 then begin

writeln('error');

exit;

end;

kvy:=((y-1) div 4)-((y-1) div 100)+((y-1) div 400);

kd:=365*(y-1-kvy)+366*kvy;{kol dney do jen year}

dw:=kd mod 7;

gotoxy(1,1);

mm:=0;

y1:=1;

if m=0 then for ii:=0 to 2 do

begin

y2:=y1+10;

x1:=1;

for jj:=0 to 3 do

begin

x2:=x1+20;

mm:=mm+1;

window(x1,y1,x2,y2);

cl(y,mm,dw);

x1:=x1+24;

end;

y1:=y1+10;




- -  - -  - -