UNIX Free Pascal


.. - 3


end;

if (m>0)and (m<=12) then cl(y,m,dw);

if y<0 then exit;

window(1,31,25,32);

writeln;

end.

 

13.64. , , , , , , 00 00 00 1 1970 .

uses sysutils;

 

var

s1,s2,s3,s4,s5,s6:integer;

rezult:real;

 

function kol_days_y(y,m,d:integer):longint;

var i,god,sum:integer;

begin

sum:=0;

 

{ }

god:=1970;

repeat

if y=god then begin break;end;

if (god mod 400<>0)and((god mod 4) =0)and((god mod 100)<>0)then sum:=sum+366 else

sum:=sum+365;

god:=god+1;

until god>y;

 

{ }

 

god:=1;

repeat

if god=m then begin break;end;

case god of

1,3,5,7,8,10,12:begin sum:=sum+31;end;

4,6,9,11:sum:=sum+30;

2:begin

if ((y mod 4) =0)and((y mod 100)<>0)then sum:=sum+29 else

sum:=sum+28;

end;

end;

god:=god+1;

until god>m;

 

kol_days_y:=sum+d-1;{ , -1}

end;

 

begin

if paramcount<>6 then

begin

writeln(' . : 2004 2 20 12 45 55');

halt(1);

end else

 

begin

s1:=strtoint(paramstr(1));

s2:=strtoint(paramstr(2));

s3:=strtoint(paramstr(3));

s4:=strtoint(paramstr(4));

s5:=strtoint(paramstr(5));

s6:=strtoint(paramstr(6));

 

if (s1<0)or(s2<0)or(s3<0)or(s4<0)or(s5<0)or(s6<0)then

begin

writeln(' ');

halt(1);

end;

 

if (s2<1)or(s2>12)then

begin

writeln(' ');

halt(1);

end;

if (s3<1)or(s3>31)then

begin

writeln(' ');

halt(1);

end;

if (s4<0)or(s4>23)then

begin

writeln(' ');

halt(1);

end;

if (s5<0)or(s5>59)then

begin




- -  - -  - -