1)
var a: array [0..9] of integer;
i: integer;
begin
for i := 0 to 9 do
a[i] := random(25);
<span>end.
2)
var a: array [0..9] of integer;
i, m: integer;
begin
for i := 0 to 9 do
begin
readln(a[i]);
if (a[i] mod 2 = 0) then m := m + a[i];
end;
writeln(m / 10);
<span>end.
3)
var a: array [0..9] of integer;
i, m: integer;
begin
for i := 0 to 9 do
begin
a[i] := random(50);
writeln('[', i, '] => ', a[i]);
if ((a[i] mod 2 = 1) and (i mod 2 = 0)) then a[i] := a[i] * 2;
end;
writeln('-------------------');
for i := 0 to 9 do
writeln('[', i, '] => ', a[i]);
<span>end.
4)
var a: array [0..9] of integer;
i, m: integer;
begin
a[0] := 2;
a[1] := 3;
a[2] := 5;
a[3] := 7;
a[4] := 11;
a[5] := 13;
a[6] := 17;
a[7] := 19;
a[8] := 23;
a[9] := 29;
for i := 0 to 9 do
writeln('[', i, '] => ', a[i]);
<span>end.
C последним схитрил... Но работает же =)</span></span></span></span>
Var x, y: integer;
begin
readln(y);
x := 0;
if x>0 then (двоеточие не надо)
writeln(x, y);
end.
1 - 33
2 - 98
3 - 61
4 - <span>111011
5 - 8
6 - </span><span>76C
7 - </span><span>111010101</span><span>
8 - 72
9 - 4C</span>
ВОТ!!!!!!!!!!!!!!!!!!!!!!!
PascalABC.net
var
i:integer;
a:array[1..10]of integer;
begin
writeln('Исходный массив:');
for i:=1 to 10 do
begin
a[i]:=random(-5,5);
write(a[i]:4);
end;
for i:=1 to 10 do
if a[i]>0 then a[i]:=a[i]+2
else a[i]:=0;
writeln;
writeln('Преобразованный массив:');
for i:=1 to 10 do
write(a[i]:4);
<span>end.</span>