Uses graphAbc;
const
w = 600;
r = 300;
dl = 40;
sl = 250;
ml = 200;
hl = 150;
var
h,m,s: integer;
i:integer;
x,y: integer;
g: real;
begin
setwindowsize(w,w);
read(h,m,s);
h := h mod 12;
setpenwidth(2);
circle(w div 2, w div 2, r);
for i := 0 to 59 do
begin
g := (i*360/60 - 90) * pi/180;
if i mod 12 = 0 then
begin
x := w div 2 + round((r - dl) * cos(g));
y := w div 2 + round((r - dl) * sin(g));
end
else
begin
x := w div 2 + round((r - dl div 3) * cos(g));
y := w div 2 + round((r - dl div 3) * sin(g));
end;
line(x,y,w div 2 + round(r*cos(g)),w div 2 + round(r*sin(g)))
end;
setbrushcolor(clwhite); while true do
begin
setpencolor(clwhite);
circle(w div 2, w div 2, sl);
setpencolor(clblack);
setpenwidth(1);
g := (6*s - 90) * pi/180;
x := w div 2 + round(sl * cos(g));
y := w div 2 + round(sl * sin(g));
line(w div 2, w div 2, x, y);
setpenwidth(2);
g := ((60*m + s)/10 - 90) * pi/180;
x := w div 2 + round(ml * cos(g));
y := w div 2 + round(ml * sin(g));
line(w div 2, w div 2, x, y);
setpenwidth(3);
g := (360*(60*60*h + 60*m + s)/12/60/60 - 90) * pi/180;
x := w div 2 + round(hl * cos(g));
y := w div 2 + round(hl * sin(g));
line(w div 2, w div 2, x, y);
s := s + 1;
if s = 60 then
begin
m := m + 1;
s := 0;
end;
if m = 60 then
begin
h := (h + 1) mod 12;
m := 0
end;
sleep(1000)
end;
end.