Program prog;
uses crt;
var a:array[1..10] of integer;
s,i: integer;
begin
clrscr;
for i:=1 to 10 do begin
write('a[',i,'] = ');
readln(a[i]);
end;
for i:=1 to 10 do begin
if (a[i] mod 2 = 1) and (a[i]>6) then
s:=s+a[i];
end;
writeln('Сумма чисел s = ', s);
end.
Program func;
const
H = 0.2;
var
i, y, sum: real;
function Func(x:real):real;
begin
Func := x * Cos( (2 * x) );
end;
begin
i := -1;
sum := 0;
while i<=1 do
begin
y := Func(i);
if y>0 then
sum := sum + y;
i := i + H;
end;
end.