Var a:array[1..8] of integer; i:integer; begin randomize; for i:=1 to 8 do begin a[i]:=random(6); if a[i] mod 2 = 0 then a[i]:=a[i]*5 else a[i]:=a[i]-2; write(a[i],' '); end; end.
Uses crt; var a:array[1..8] of integer; x:integer; begin randomize; for x:=1 to 8 do begin a[x]:=random(6); writeln('a[',x,']:',a[x]); end; writeln; for x:=1 to 8 do begin if a[x] mod 2=0 then a[x]:=a[x]*5 else a[x]:=a[x]-2; writeln('a[',x,']:',a[x]); end; end.
a:array[1..8] of integer;
i:integer;
begin
randomize;
for i:=1 to 8 do
begin
a[i]:=random(6);
if a[i] mod 2 = 0 then a[i]:=a[i]*5
else a[i]:=a[i]-2;
write(a[i],' ');
end;
end.
Надеюсь на "Лучший ответ"
var a:array[1..8] of integer;
x:integer;
begin
randomize;
for x:=1 to 8 do
begin
a[x]:=random(6);
writeln('a[',x,']:',a[x]);
end;
writeln;
for x:=1 to 8 do
begin
if a[x] mod 2=0 then a[x]:=a[x]*5
else a[x]:=a[x]-2;
writeln('a[',x,']:',a[x]);
end;
end.