Пользователь
Сообщения: 51
Благодарности: 1
|
Профиль
|
Отправить PM
| Цитировать
3.
program lab(output);
var
A: array[0..10, 0..10] of real;
B: array[0..10, 0..10] of integer;
vektor: array[0..10] of real;
i,j: integer;
q,w, min:integer;
proizv :real;
begin
writeln('Acckij massiv A[11,11]');
for i:=0 to 10 do
begin
for j:=0 to 10 do
begin
A[i,j]:=4*(3.5-i)-1.5*j*j+20*cos(i*j);
write(A[i,j]:10:4);
end;
writeln();
end;
for i:=0 to 10 do
begin
for j:=0 to 10 do
begin
IF A[i,j]<0 then B[i,j]:=i*j
else
B[i,j]:=0
end;
end;
min:=100;
for i:=0 to 10 do
begin
for j:=0 to 10 do
begin
if (B[i,j]<min) and (B[i,j]<>0) then
begin
min:=B[i,j];
q:=i;
w:=j;
end;
end;
end;
writeln('Pervoe otricatel~noe chislo:', A[q,w]:10:4);
writeln('Nomer stroki i stolbca pervogo otricatel~nogo chisla:', q,',',w);
proizv:=1;
for j:=0 to 10 do
begin
proizv:=proizv*A[q,j];
end;
for i:=0 to 10 do
begin
proizv:=proizv*A[i,w];
end;
for i:=0 to 9 do
begin
vektor[i]:=A[i,5];
end;
vektor[10]:=proizv;
writeln('Chudo vektor');
writeln;
for i:=0 to 10 do
begin
writeln(vektor[i]:15:4);
end;
end.
|