Каталог :: Философия

Реферат: Платон и Аристотель

program MAXIMUM;
uses crt;
const N=3;
type
matrix=array[1..N,1..N] of real;
var c:matrix;
max1,max2:real;
i,y,ymax1,ymax2:integer;
begin
clrscr;
writeln ('Введите матрицу');
for i:=1 to n do
for y:=1 to n do begin
readln(c[i,y]);
end;
max1:=c[1,1];
ymax1:=1;
for i:=1 to n do begin y:=i;
if max1<c[i,y]  then begin max1:=c[i,y];
ymax1:=i;
end;
end;
max2:=c[1,1];
ymax2:=1;
for i:=1 to n do begin y:=n-i+1;
if max2<c[i,y] then begin max2:=c[i,y];
ymax2:=i;
end;
end;
if max1>max2 then begin
writeln(max1:8:2);
for y:=1 to n do begin
writeln(c[ymax1,y]:8:2);
end;
end
else writeln(max2:8:2);
for y:=1 to n do begin
writeln(c[ymax2,y]:8:2);
end;
end.