UNIX Free Pascal


.. - 4


writeln(' ');

halt(1);

end;

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

begin

writeln(' ');

halt(1);

end;

end;

 

case s2 of

2:begin

if ((s1 mod 4)=0)and((s1 mod 4)=0)then

begin

if s3>29 then begin

writeln(' 29 ');

halt(1);

end;

end

else

if s3>28 then

begin

writeln(' 28 ');

halt(1);

end;

end;

4,6,9,11: if s3>30 then

begin

writeln(' ',s2,' 30 ');

halt(1);

end;

end;

 

if s1<=1969 then

begin

writeln(' ');

halt(1);

end;

 

writeln(' = ');

writeln(' = ',kol_days_y(s1,s2,s3)*24*3600+s4*3600+s5*60+s6,'c.');

 

end.

 

13.65. "", 3 .

uses dos,crt,sysutils,linux;

var

Hour , Min , Sec , HSec : word ;

procedure handler(sig:longint);cdecl;

begin

end;

 

procedure sleep(count:integer);

var

old:signalhandler;

begin

old:=signal(SIGALRM,@handler);

alarm(count);

pause;

signal(SIGALRM,old);

alarm(0);

end;

function L0 (w : word ) : string;

var

s : string;

begin

Str( w , s );

if w<10 then

L0 := '0'+ s

else

L0 := s ;

end ;

 

var

s:string;

i:integer;

begin

WriteLn ( ' , 3 ') ;

repeat

GetTime ( Hour , Min , Sec , HSec ) ;

s := L0 (Hour ) + ' : ' + L0 ( Min ) + ' : ' + L0 ( Sec ) ;

write(s);

sleep(3);

for i:=1 to length(s) do

write(#8);

until keypressed;

end.

 




- -  - -  - -