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;
Program zadacha;
Const n = 10;
Type mas=array[1..n] of integer;
Var s,i,k,d:integer;
m:mas;
Begin
s:=0;
k:=0;
readln(d);
For i:=1 to n do
read(m[i]);
For i:=1 to n do
if m[i]<d then begin
s:=s+m[i];
k:=k+1;
end;
writeln('Сумма чисел < d = ',s,' Колиество чисел < d = ',k);
end. (Это решение для случая если вы вводите сразу весь массив чисел)
Program zadacha;
Const n = 10;
Var s,i,k,d,m:integer;
Begin
s:=0;
k:=0;
readln(d);
for i:=1 to n do begin
readln(m);
if (m < d) then begin
s:=s+m14;
k:=k+1;
end;
end;
writeln('Сумма чисел < d = ',s,' Колиество чисел < d = ',k);
end. (А это решение для того случая когда вы вводите элементы по одному )
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.