Ответить на комментарий

данный массив заполняется случайными числавми от -20 до 60

var i, n, k: integer;
a: array[1..100] of integer;
begin
readln (n);
for i:=1 to n do
begin a[i]:= random (80)-20;
write (a[i]:4); end;
writeln;
for i:=1 to n do
if a[i]<-2 then k:=k+1;
if k>0 then for i:=1 to n do if a[i]<0 then a[i]:= sqr (a[i]);
for i:=1 to n do
write (a[i]:4);
writeln;
end.

Ответить

  • Строки и параграфы переносятся автоматически.
  • You can enable syntax highlighting of source code with the following tags: , , . The supported tag styles are: , [foo].

Подробнее о форматировании