пожалуйста помогите переставить 3 и 5 столбец и 3 и 5 строку в массиве ...вроде правильно написала но выходит ошибка

program mas55;
const n=5;
type st=array[1..n] of real;
var i,j,d:integer;
b:st;
a:array[1..n] of st;
begin
for i:=1 to n do
for j:=1 to n do if j=3 then a[i,j]:=sqr(i)*j else a[i,j]:=2;
for i:=1 to n do
begin
for j:=1 to n do write (a[i,j]:6);
writeln
end;
writeln;
b:=a[3];
a[3]:=a[4];
a[4]:=b;
for i:=1 to n do
begin
for j:=1 to n do write (a[i,j]:6);
writeln;
for i:=1 to n do
begin
d:=a[i,3];
a[i,3]:=a[i,5];
a[i,5]:=d
end;
for i:=1 to n do
begin
for j:=1 to n do write (a[i,j]:6);
writeln
end;
writeln
end
end.
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.