Номер 1
Program n_1;
var MAS: array [1..10] of integer; i: integer;
begin
for i:=1 to 10 do read(MAS[i]);
for i:=1 to 10 do if i mod 2 = 0 then write(MAS[i], ' ');
end.
Номер 2
Program n_1;
var MAS: array [1..10] of integer; i, s: integer;
begin
s:=0;
for i:=1 to 10 do read(MAS[i]);
for i:=1 to 10 do if MAS[i] mod 2 = 1 then s:=s+MAS[i];
writeln(s);
end.
Номер 3
Program n_1;
var MAS: array [1..5] of integer; i, s: integer;
begin
for i:=1 to 5 do read(MAS[i]);
s:=trunc(5/2)+1;
MAS[s]:=MAS[s-1]+MAS[s+1];
writeln(MAS[s]);
end.
Номер 4
Program n_1;
var MAS: array [1..10] of integer; i, n: integer;
begin
for i:=1 to 10 do read(MAS[i]);
n:=MAS[10];
for i:=9 downto 1 do begin
MAS[i+1]:=MAS[i];
end;
MAS[1]:=n;
for i:=1 to 10 do write(MAS[i], ' ');
end.
Номер 5
Program n_1;
var MAS: array [1..10] of integer; i: integer;
begin
for i:=1 to 10 do begin
read(MAS[i]);
if i mod 2 = 0 then MAS[i]:=0;
end;
for i:=1 to 10 do write(MAS[i], ' ');
end.