Ответы и объяснения

2014-02-10T20:24:00+04:00
1.
program first;
var a:array[1..6] of real;
     summ:real;
     i:integer;
begin
summ:=0;
for i:=1 to 6 do read(a[i]);
for i:=1 to 6 do summ:=summ+a[i];
writeln(summ);
end.

2.
program second;
var a: array[1..10] of integer;
     i, pr:integer;
begin
proiz:=1;
for i:=1 to 10 do read(a[i]);
for i:=1 to 10 do if (i mod 2<>0) then pr:=pr*a[i];
writeln(pr);
end.

3.
program third;
var a:array[1..10] of integer;
     i, count, summ:integer;
     srznach:real;
begin
summ:=0;
count:=0;
for i:=1 to 10 do read(a[i]);
for i:= 1 to 10 do if (a[i]>=0) then 
 begin
 count:=count+1;
 summ:=summ+a[i];
 end;
srznach:=summ/count;
writeln(summ);
end.