Помогите исправить код так, что бы массив А, заполнялся рандомно. Пожалуйста.
var
a:array[1..100,1..100] of integer;
c:array[1..20,1..20] of real;
b:array[1..20,1..20] of real;
i,j,n,k:integer;
t:real;
r:integer;
begin
t:=0;
Writeln('Введите порядок матрицы: ');
readln(n);
for i:=1 to n do
for j:=1 to n do
begin
Write('a[',i,',',j,']=');
Readln(a[i,j]);
end;
for i:=1 to n do
for j:=1 to n do
begin
b[i,j]:=1/i+j-1;
end;
for i:=1 to n do
for j:=1 to n do
begin
for k:=1 to n do
begin
t :=t+a[i,k]*b[k, j];
end;
c[i,j]:=t;
t:=0;
end;
for i:=1 to n do
begin
for j:=1 to n do
begin
write(' ',c[i,j]:2:2);
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.