Дано натуральные число n и m. Действительная матрица размера m*n. Найти среднее арифметические каждого из столбцов, имеющих четные номера.
procedure TForm1.Button1Click(Sender: TObject);
const
n=5;
m=5;
var
z:array[1..n,1..m] of real;
i,j,k : byte;
sum, sr : real;
begin
randomize;
for i:=1 to n do
for j:=1 to m do
z[i,j]:=200+random(100);
Label1.Caption :=inttostr(z[i,j]);
k:=2;
while k<=z do begin
sum:=0;
for j:=1 to n do
sum:=sum+z[j,i];
sr:=sum/n;
Label2.Caption :=inttostr(sr);
end;
end;
end.
Ошибки unit1.pas(48,36) Error: Incompatible type for arg no. 1: Got "Real", expected "QWord"
unit1.pas(51,11) Error: Operator is not overloaded: "Byte" <= "Array[1..5] Of Array[1..5] Of Real"
unit1.pas(56,34) Error: Incompatible type for arg no. 1: Got "Real", expected "QWord"
procedure TForm1.Button1Click(Sender: TObject);
const
n=5;
m=5;
var
z:array[1..n,1..m] of real;
i,j,k : byte;
sum, sr : real;
begin
randomize;
for i:=1 to n do
for j:=1 to m do
z[i,j]:=200+random(100);
Label1.Caption :=inttostr(z[i,j]);
k:=2;
while k<=z do begin
sum:=0;
for j:=1 to n do
sum:=sum+z[j,i];
sr:=sum/n;
Label2.Caption :=inttostr(sr);
end;
end;
end.
Ошибки unit1.pas(48,36) Error: Incompatible type for arg no. 1: Got "Real", expected "QWord"
unit1.pas(51,11) Error: Operator is not overloaded: "Byte" <= "Array[1..5] Of Array[1..5] Of Real"
unit1.pas(56,34) Error: Incompatible type for arg no. 1: Got "Real", expected "QWord"