1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
uses crt,graphABC;
var h,c,r1,r2,r3,i,x1,y1,x2,y2:integer;
u:real;
begin
repeat
write('Введите время в часах, от 0 до 24 кратное 3 h=');
readln(h);
until (h in [0..24])and(h mod 3=0);
setwindowsize(400,400);
c:=200;
r1:=c-30;
r2:=r1-40;
r3:=r1+20;
centerwindow;
clrscr;
hidecursor;
circle(c,c,r1);
//u:=pi/2-pi/6;
for i:=1 to 12 do
u:=-i*pi/6+pi/2;
x1:=c+round(r1*cos(u));
y1:=c-round(r1*sin(u));
setbrushcolor(clBlack);
setbrushstyle(bsSolid);
circle(x1,y1,2);
x2:=c+round(r3*cos(u));
y2:=c-round(r3*sin(u));
u:=u-pi/6 ;
setbrushstyle(bsClear);
textout(x2-3,y2-5,inttostr(i));
end;
setpenwidth(3);
h:=h mod 24 mod 12;
u:=-h*pi/6+pi/2;
line(c,c,c+round(r2*cos(u)),c-round(r2*sin(u)));
end.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
uses crt,graphABC;
var h,c,r1,r2,r3,i,x1,y1,x2,y2:integer;
u:real;
begin
repeat
write('Введите время в часах, от 0 до 24 кратное 3 h=');
readln(h);
until (h in [0..24])and(h mod 3=0);
setwindowsize(400,400);
c:=200;
r1:=c-30;
r2:=r1-40;
r3:=r1+20;
centerwindow;
clrscr;
hidecursor;
circle(c,c,r1);
//u:=pi/2-pi/6;
for i:=1 to 12 do
begin
u:=-i*pi/6+pi/2;
x1:=c+round(r1*cos(u));
y1:=c-round(r1*sin(u));
setbrushcolor(clBlack);
setbrushstyle(bsSolid);
circle(x1,y1,2);
x2:=c+round(r3*cos(u));
y2:=c-round(r3*sin(u));
u:=u-pi/6 ;
setbrushstyle(bsClear);
textout(x2-3,y2-5,inttostr(i));
end;
setpenwidth(3);
h:=h mod 24 mod 12;
u:=-h*pi/6+pi/2;
line(c,c,c+round(r2*cos(u)),c-round(r2*sin(u)));
end.